changing block parameter during simulation.

I am trying to simulate electrical circuit with matlab, but I have inductor and resistor load, I need change their parameters during simulation. Any idea ?
thanks

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 23 de Mayo de 2014
Editada: Azzi Abdelmalek el 23 de Mayo de 2014
Use set_param to modify your block parameters. Use also
set_param(modelName,'SimulationCommand','start'); % to start simulation
set_param(modelName,'SimulationCommand','pause'); % to pause simulation
% Change your parameters with set_param
set_param(modelName,'SimulationCommand','update');
set_param(modelName,'SimulationCommand','continue'); % to continue simulation

4 comentarios

Azzi Abdelmalek
Azzi Abdelmalek el 23 de Mayo de 2014
Fix what? where is your code?
BARAN Özbakr
BARAN Özbakr el 23 de Mayo de 2014
Editada: Azzi Abdelmalek el 23 de Mayo de 2014
Matlab says;
set_param('igbt_deneme/RL','Resistance','5');
Cannot change parameter 'Resistance (Ohms): (Resistance)' of 'igbt_deneme/RL' while simulation is running.
what can I do? thanks.
Azzi Abdelmalek
Azzi Abdelmalek el 23 de Mayo de 2014
Editada: Azzi Abdelmalek el 23 de Mayo de 2014
Before changing the parameter use
set_param('igbt_deneme','SimulationCommand','pause')
BARAN Özbakr
BARAN Özbakr el 23 de Mayo de 2014
I am using set_param('igbt_deneme','SimulationCommand','pause'), but it is stll giving an error .

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Electrical Block Libraries en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Mayo de 2014

Comentada:

el 23 de Mayo de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by