Simulink control problem

764 views
Skip to first unread message

youan Li

unread,
May 25, 2017, 6:17:01 PM5/25/17
to bcvtb
Dear all,

I already designed a PI controller in MATLAB/SIMULINK to control the valve of heating system in EnergyPlus. When I try to run both programs together, I get following error in MATLAB. 
Invalid setting for fixed-step size (900.0) in model 'controller'. All sample times in your model must be an integer multiple of the fixed-step size. 
The sample time period (1.0) of 'controller/controller/controller/Discrete PID Controller/Filter' is not an integer multiple of the fixed 
step size (900.0) specified for model.
I already make sure time-step in BCVTB is 15*60 and number of timestep per hour is 4. Is there anyone help me to solve this problem?

Thanks,
Youan
controller.PNG

youan Li

unread,
May 25, 2017, 6:35:26 PM5/25/17
to bcvtb
Dear all, 

I already fix the problem. But now I get another.
The "FixedStepDiscrete" solver cannot be used to simulate block diagram 'controller' because it contains continuous states.
Is that means I need to change the continuous controller to be discrete? 

Thanks,
Youan

在 2017年5月26日星期五 UTC+2上午12:17:01,youan Li写道:

Thierry Nouidui

unread,
May 25, 2017, 6:52:37 PM5/25/17
to bc...@googlegroups.com
Why are you not using a variable time step (continuous) solver instead?
Thanks!

Thierry

--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
--------------------------------------
Thierry Stephane Nouidui, PhD

Simulation Research Group
Lawrence Berkeley National Laboratory
1 Cyclotron Road, MS 90R3147
Berkeley, CA 94720
(510) 495-2337 voice
email: TSNo...@lbl.gov
http://simulationresearch.lbl.gov
----------------------------------------

youan Li

unread,
May 26, 2017, 3:28:51 PM5/26/17
to bcvtb
Hello Thierry,

is that means I need to change Discrete Time Director to Continuous Time Director in BCVTB interface?
 
Thanks,
Youan

在 2017年5月26日星期五 UTC+2上午12:52:37,Thierry Nouidui写道:
Why are you not using a variable time step (continuous) solver instead?
Thanks!

Thierry
On Thu, May 25, 2017 at 3:35 PM, youan Li <youa...@gmail.com> wrote:
Dear all, 

I already fix the problem. But now I get another.
The "FixedStepDiscrete" solver cannot be used to simulate block diagram 'controller' because it contains continuous states.
Is that means I need to change the continuous controller to be discrete? 

Thanks,
Youan

在 2017年5月26日星期五 UTC+2上午12:17:01,youan Li写道:
Dear all,

I already designed a PI controller in MATLAB/SIMULINK to control the valve of heating system in EnergyPlus. When I try to run both programs together, I get following error in MATLAB. 
Invalid setting for fixed-step size (900.0) in model 'controller'. All sample times in your model must be an integer multiple of the fixed-step size. 
The sample time period (1.0) of 'controller/controller/controller/Discrete PID Controller/Filter' is not an integer multiple of the fixed 
step size (900.0) specified for model.
I already make sure time-step in BCVTB is 15*60 and number of timestep per hour is 4. Is there anyone help me to solve this problem?

Thanks,
Youan

--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thierry Nouidui

unread,
May 26, 2017, 3:51:19 PM5/26/17
to bc...@googlegroups.com
I don't get this quite. The BCVTB uses the SDF director. I was referring to the Simulink solver.
Thank!

Thierry

To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

youan Li

unread,
May 26, 2017, 5:57:39 PM5/26/17
to bcvtb
Hello Thierry,
 
I'm sorry to bother you again. I changed Simulink solver in  MATLAB. But there is another problem. BCVTB gives me feedback of connection reset. And the final result looks like only two points.

Thanks, 
Youan
在 2017年5月26日星期五 UTC+2下午9:51:19,Thierry Nouidui写道:
configuration parameter in simulink.PNG
matlab warning.png
simulink connection reset.PNG
bcvtb result.PNG

Thierry Nouidui

unread,
May 26, 2017, 6:05:54 PM5/26/17
to bc...@googlegroups.com
I don't know what is implemented in your controller but it seems to have an algebraic loop. I am also not that familiar with Simulink but know that t sometime needs the loop to be broken so the simulation can run. 
I suggest to do your controller development in Simulink first, see whether it can be run there, and then couple it with other tools through the BCVTB.

Thanks!

Thierry

To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

youan Li

unread,
May 26, 2017, 6:10:10 PM5/26/17
to bcvtb
Thanks for your suggestion.

Youan

在 2017年5月27日星期六 UTC+2上午12:05:54,Thierry Nouidui写道:
Reply all
Reply to author
Forward
0 new messages