How to change phase in Phase shift full bridge?

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

 Respuesta aceptada

Kevin
Kevin el 27 de Mzo. de 2015

0 votos

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 comentario

sanu joy
sanu joy el 6 de Mayo de 2020
Hi kevin,
Could you please share the file "Electrical_circuit\variablePhase2.m".
it is not included in the zip file.

Iniciar sesión para comentar.

Más respuestas (1)

Jos van Rens
Jos van Rens el 19 de Ag. de 2019

0 votos

Hi Kevin
Will it be possible to get the s-function variablePhase2
It was not in the *.zip
Best regards
Jos van Rens

1 comentario

sanu joy
sanu joy el 6 de Mayo de 2020
Hi jos,
do you have this s-function variablePhase2 file.
please share if you have this.
Regards,
Sanu Joy

Iniciar sesión para comentar.

Productos

Preguntada:

el 17 de Mzo. de 2015

Comentada:

el 6 de Mayo de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by