Re: [Scilab-users] Xocs : enabled superblocks and multi frequence diagram

2014-07-22 Thread Quentin Mazué
Hi Serge,

Thanks for your help it works.

Your 1st solution wasn't applicable in my case because my blocks at 10 and
1000Hz don't have the same equations inside.

Your 2nd solutions works fine. Enclosed a full diagram to perform some
simple speed evaluations if anyone need it.

Multi_Freq_Test.zip
  

Thanks
Quentin Mazué



--
View this message in context: 
http://mailinglists.scilab.org/Xcos-enabled-superblocks-and-multi-frequence-diagram-tp4030940p4030944.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Xocs : enabled superblocks and multi frequence diagram

2014-07-21 Thread Serge Steer
The solution of your problem depends the solution of your problem 
depends on the type of your state system:


- if it is a continous time state system  the xcos solver is able to 
automatically adapt its step size so, it is not necessary to handle two 
copies of your superblock
- if it is a discret time system you can use two SampleCLK block one 
with 1/10 period and the other one with 1/1000 period as explained in 
the attached xcos diagram


Serge Steer
Le 21/07/2014 08:45, Quentin Mazué a écrit :

Hello,

I need to model a special phenomenon which has two different states:

->1) A transient state: from 0 to 1 sec.
For this phase I need calculations with a very small time step (around
0.001s)

->2) Then a steady state: from 1 to end of simulation (around 10-15sec)
For this phase I need calculations with a large time step (0.1s)

Enclosed, a picture of an equivalent Simulink diagram which matches my
needs.
  
Illustration_EnabledSuperblocks_MultifreqDiagram.png



Both phases have the same inputs calculated with the same block.

I would like to:

->a) Specify that I have 2 superblocks within the same Xcos diagram that
make the computations with different time step and a third one with a time
step which change during the simulation (the Input superblock)

->b) be able to deactivate the transient superblock when I don’t need
transient calculations and activate the steady block only when I need it.


Why I would like to do that?

->I’m working with a new way of computing a phenomenon and I have to show
that this new method is faster than the previous method and enough accurate.
If I don’t deactivate the transient block, Xcos is still running this block
and I lose all the interest of my new model.

->at the same time, I have to show that Scilab/Xocs is able to match the
need of my company. They are actually using a lot Matlab/Simulink,
especially the blocks: enabled subsystem, triggered subsystem, trigger, zero
order hold, rate transition,…



Thanks for your help

Quentin Mazué




--
View this message in context: 
http://mailinglists.scilab.org/Xocs-enabled-superblocks-and-multi-frequence-diagram-tp4030940.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




Mazue.zcos
Description: Binary data
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Xocs : enabled superblocks and multi frequence diagram

2014-07-20 Thread Quentin Mazué
Hello,

I need to model a special phenomenon which has two different states: 

->1) A transient state: from 0 to 1 sec.
For this phase I need calculations with a very small time step (around
0.001s) 

->2) Then a steady state: from 1 to end of simulation (around 10-15sec)
For this phase I need calculations with a large time step (0.1s)

Enclosed, a picture of an equivalent Simulink diagram which matches my
needs.
 
Illustration_EnabledSuperblocks_MultifreqDiagram.png

  

Both phases have the same inputs calculated with the same block.

I would like to:

->a) Specify that I have 2 superblocks within the same Xcos diagram that
make the computations with different time step and a third one with a time
step which change during the simulation (the Input superblock)

->b) be able to deactivate the transient superblock when I don’t need
transient calculations and activate the steady block only when I need it.


Why I would like to do that?

->I’m working with a new way of computing a phenomenon and I have to show
that this new method is faster than the previous method and enough accurate.
If I don’t deactivate the transient block, Xcos is still running this block
and I lose all the interest of my new model.

->at the same time, I have to show that Scilab/Xocs is able to match the
need of my company. They are actually using a lot Matlab/Simulink,
especially the blocks: enabled subsystem, triggered subsystem, trigger, zero
order hold, rate transition,…



Thanks for your help

Quentin Mazué




--
View this message in context: 
http://mailinglists.scilab.org/Xocs-enabled-superblocks-and-multi-frequence-diagram-tp4030940.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users