Clear Filters
Clear Filters

Simulink model for Uv lightsource-photodiode response

12 views (last 30 days)
Hello folks !
I have some trouble creating a simulink model for my UV abrorption sensor. I think there is something I am missing and I am sorry in advance if my question is naive. So briefly :
I have an array of wavelengths starting from 200nm all the way to 280nm with a step of 1nm. (lambda)
I have the irradiance values of my lightsource with respect to wavelength from above (ixenon)
Similarly I have the values for a bandpass optical filter (filter)
and a photodiode sensitivity (phd) with values with respect to wavelength that convert light to current
Last but not least I have an array of values for the light emitance power my lightsource (pxenon) with respect to time
I want to create a simulink model where a pulse is behaving according to pxenon values with respect to time and the irradiance is modified according to the filter transmittance before reaching the photodiode, where irradiance is converted to current.
I know that I want to have the ixenon values multiplied with the filter values and the phd values (all element-wise multiplication) and after that they need to be summed, but I have problem choosing the simulink blocks and using the pxenon values. Is there any advice you can give me ?

Answers (1)

Suraj Kumar
Suraj Kumar on 23 May 2024
Hi Ioannis,
To create a Simulink model for achieving the functionalities like element-wise multiplication and summation you can use the below mentioned blocks:
  • Signal From Workspace Block: Helps import data from MATLAB workspace into Simulink.
  • Product Block: Performs element-wise multiplication of inputs. In this model, it is used to multiply the ixenon irradiance values by the filter transmittance and phd values.
  • Sum Block: Adds the inputs together. After the ixenon, filter, and phd values are multiplied elementwise, the Sum block aggregates these products to simulate the total effective irradiance reaching the photodiode.
You can also use the “MATLAB Function Block.” This block enables you to write custom scripts and functions in MATLAB's programming language. It allows you to perform specific tasks and integrate them directly into your Simulink models.
To observe and verify the pulse behaviour according to the pxenon values you can use blocks like,
  • Scope: To visualise the values and verify its accordance with the expected behaviour.
  • To Workspace: You can log the output signals to the MATLAB workspace using this block and compare the required signals with the logged signals.
For more insights on the above-mentioned blocks in Simulink, you can refer the following documentations:
  1. https://www.mathworks.com/help/simulink/slref/fromworkspace.html
  2. https://www.mathworks.com/help/simulink/slref/product.html
  3. https://www.mathworks.com/help/simulink/slref/add.html
  4. https://www.mathworks.com/help/simulink/ug/what-is-a-matlab-function-block.html
  5. https://www.mathworks.com/help/simulink/slref/toworkspace.html
Hope this helps!

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!