MATLAB Answers

How to change phase in Phase shift full bridge?

30 views (last 30 days)
Kevin
Kevin on 17 Mar 2015
Commented: sanu joy on 6 May 2020
Hello everyone. I'm now trying to simulate a PSFB. Basically, it's a isolated chopping DC-DC transformer. Instead of controlling the duty cycle, you control the phase for 2 of the PWM. You will then allow more or less power to flow.
The problem is: How to dynamically change the phase with a feedback loop
-Of a controled PWM voltage (the parameter is "TD", time delay.)
-Of a pulse generator (parameter "phase delay")
I have been trying to use a S function. I can succesfully change the duty cycle (actually, S function are quite easy to use, and very useful ^^). I can change a lot of parameter, but not the PHASE DELAY .
Here is the error message: " Error evaluating registered method 'InitializeConditions' of MATLAB S-Function 'variablePhase2' in 'phase_shift_bridge_v0_2/Level-2 MATLAB S-Function'. The following is the MATLAB call stack (file names and line numbers) that produced this error: ['D:\Velocar\Battery_Charger\Electrical_circuit\variablePhase2.m'] [53]
Cannot change parameter 'Phase delay (secs): (PhaseDelay)' of 'phase_shift_bridge_v0_2/Pulse Generator2' while simulation is running"
I am really stuck on this one. I have read many document about S function, and I don't know what's going on (except that it seems that some parameter of Simscape component cannot be modified by S function. But why the phase delay can't be touch during simulation while duty cycle can?)
As always, I will look for an answer, and if I find something, I will let you know =D

Accepted Answer

Kevin
Kevin on 27 Mar 2015
I made my own s-function in order to do that. You can't modify certain parameter during simulation, so I made my own PWM generator
I attached my file for the s-function. If you want to re use it, you will have to read it and create a s function block with the right name.
Cheers =D
  1 Comment
sanu joy
sanu joy on 6 May 2020
Hi kevin,
Could you please share the file "Electrical_circuit\variablePhase2.m".
it is not included in the zip file.

Sign in to comment.

More Answers (1)

Jos van Rens
Jos van Rens on 19 Aug 2019
Hi Kevin
Will it be possible to get the s-function variablePhase2
It was not in the *.zip
Best regards
Jos van Rens
  1 Comment
sanu joy
sanu joy on 6 May 2020
Hi jos,
do you have this s-function variablePhase2 file.
please share if you have this.
Regards,
Sanu Joy

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!