Help me to model closed loop PID controlled pwm Led and Photodiode using Simulink.

2 次查看(过去 30 天)
I am making a project where I am using an led at transmitter side and photodiode at receiver side. the led is driven through PWM. My strategy is to maintain a constant voltage at the receiver side. for this i will use a closed loop control system and a pid controller. whenever the distance between the led and photodiode increases the pwm duty cycle increases such that to meet the setpoint value.
here i am using a 590nm led and a bpw34 photodiode.
i have tried making model using Physical Signal block in simulink. but whenever i try to tune the PID it says the model is not linearized. When i try to linearize the model in model linearizer it throws an error.
kindly help me to find out a solution.

回答(1 个)

Samhitha
Samhitha 2025-2-25
It will be better if you can provide the model, if not you can try the following steps.
Linearization can be challenging with physical signal blocks due to their inherent non-linear behaviour. Try to temporarily replace complex physical blocks with simplified versions or linear approximations. For example, use a transfer function or gain block that approximates the LED-photodiode relationship over a small range.
If you're running into errors when trying to linearize the model, then check following things:
  1. Make sure your simulation runs long enough for the system to reach a steady state before you attempt to linearize it.
  2. Verify that all your blocks are set up correctly and that there aren't any algebraic loops or solver issues causing problems.
Algebraic loops can be detected by Simulink diagnostic tools Go to Model Settings > Diagnostics > Algebraic loop and set it to "error" or "warning" to get notified during simulation. Also check your solver settings in Model Settings > Solver. Ensure that the solver type and step size are appropriate for your model. Sometimes, switching between fixed-step and variable-step solvers can help.
For more details, look into the following Linearisation Documentation:

类别

Help CenterFile Exchange 中查找有关 Electrical Block Libraries 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by