Good evening, I am currently developping the control program of a BUCK. My idea is to take simultaneously the input and output voltage and compute a duty cycle from there (basically a feedforward).
My simulation encounter a problem when I want to feed information coming from the output to the PWM Block (which mean that when I give the duty cycle calculated with the input and output, it crashes)
I give you the schematic (the most updated version is the one on the rigth) and the error message: An error occurred while running the simulation and the simulation was terminated
Simulink cannot solve the algebraic loop containing 'charger_caracterisation/Solver Configuration/EVAL_KEY/INPUT_1_1_1' at time 1.0E-5 using the LineSearch-based algorithm due to one of the following reasons: the model is ill-defined i.e., the system equations do not have a solution; or the nonlinear equation solver failed to converge due to numerical issues. To rule out solver convergence as the cause of this error, either a) switch to TrustRegion-based algorithm using set_param('charger_caracterisation','AlgebraicLoopSolver','TrustRegion') b) reducing the VariableStepDiscrete solver RelTol parameter so that the solver takes smaller time steps. If the error persists in spite of the above changes, then the model is likely ill-defined and requires modification.
The problem occurs only when I take information from the output, the input isn't problematic when I feed it to the algebraic loop._
Of course I tried the solutions proposed by simulink when it crashed, but nothing works.
- I removed non linear element, and especially the switches who induce discontinuities (which I wanted to use in order to perform a soft start) DONE->NO EFFECT
- I defined the priorities of some blocks: I don't want simulink to compute the duty_cycle before it compute the output. It wouldn't make any sense, even for me. DONE->NO EFFECT
- I am currently trying to suppress every direct feedthrough from this loop: I use the memory blocks to do that for the moment. I may have to use other tricks to achieve this goal. IMPOSSIBLE
- I may have to initialyse the physical conditions to help the solver by being closer to the solution, and then help it to converge. PARTIALLY DONE ->POSITIV RESULTS (but still doesn't work)
- Use of IC blocks to initialize values of feedthrough signals DONE ->POSITIV RESULTS (but still doesn't work)
- Initialization of current value in the inductor to prevent simulink from beginning the simulation in a weird initial state (like with tension rising above 40kV...) DONE, WORKING when not using feed forward
- I will also try to increase the number of iterations made by the solver when attempting to converge. UNDONE
I don't want to use a PID, because the final application of this controller is not only for a BUCK. I'll keep on looking, but if someone have a quick solution, I would gladly accept it.