variable_time_step_simulink.pdf

Embed Size (px)

Citation preview

  • 7/30/2019 variable_time_step_simulink.pdf

    1/2

    - 2 -

    N 45 - May 2004 - CEDRAT - CEDRAT TECHNOLOGIES - MAGSOFT Corp.

    SOFTWARE>>

    to Simulink Technology.

    the simulation up. Our solution?Enable SIMULINK to run severalcomputation while FLUX does onlyone!

    - The dowry

    Being able to control the time stepeasily was the major request we hadfor this co-simulation technology.Indeed, being able to adapt thetime step during the simulation isoften a good solution to reduce thecomputation time without changingthe accuracy on the results.

    As example, in the following simplecase (see figure 2), we study thecurrent in two cables fed withsinusoidal voltage and triangularvoltage respectively. As those twocables are close to each other,the current is expected not to besinusoidal (for the first cable) nortriangular (for the second cable).The time step depends on thevalue of the output current. If thecurrent' s magnitude is upper than50 Amps, the time step is 1 ms;if it is lower, the time step is 0.3ms. We can then see that the timestep varies indeed as we expected(see figure 4): the dots on theline represent every computationinstant. They are closer when thecurrent is lower than 50 Amps.

    As you may notice in figure 3,the time step is defined in theparameter list. But it can also bedefined in the box "FLUX local timestep". What is the difference?

    (continued on page 3)

    to join the power of FLUX forelectromagnetic transientsimulation and SIMULINK for driveand control.It enabled to analyse fullelectromagnetic systems includingits drive and accounting forsaturation, eddy currents, motionwithout using an approximateequivalent diagram.It is used in any application thatrequires a high level of drive:switched reluctance machines(see figure 1) are one of the most

    obvious example.It is also used to model inductances(see FLUX Magazine N41)transformers or linear actuators.

    The wedding

    To go forward and answer itscustomers requests, CEDRATdeveloped for this version thepossibility to include a variabletime step. We decided also tomake everything possible to speed

    Coupled for the best was thetitle of the article presentingthe linking technologybetween FLUX and SIMULINK. Itdates back to September 2002.Say it was just the engagement.One year and a half later, they aregetting married!After the first FLUX to SIMULINKTechnology that brought the onlyco-simulation of its kind, CEDRATreleases the new version of thistechnology: FLUX to SIMULINKTechnology VS (as Variable time

    Step).

    The success of the linkingtechnology and the comments ofthe users led us to improve it andadd new functionnalities.

    The engagement

    In order to complete a full systemanalysis, it became possible

    Figure 2: SIMULINK model where the time step is defined asfunction of the current in one conductor.

    Figure 1: SRM and its drive modelled withFLUX to SIMULINK Technology (courtesyof HWV, Belgium).

    Figure 3: FLUX to SIMULINK block, withthe Time Step defined as a parameter.

  • 7/30/2019 variable_time_step_simulink.pdf

    2/2

    SOFTWARE>> - 3 -

    N 45 - May 2004 - CEDRAT - CEDRAT TECHNOLOGIES - MAGSOFT Corp.

    Variable time step: Constant improvements for FLUX

    to Simulink Technology. (continued) S. CADEAU-BELLIARD, Patrick GIRARD - Cedrat.

    called Minimal input variation (%)to run FLUX computation. Say wedecide to set this value to 10. Eachtime the input values are computed,they are compared to the valueused for the last FLUX computation.If the difference is lower than 10 %,then no FLUX computation is done.If it is greater, FLUX computes thecorresponding time step.As we may see in figure 5, the valueof the current does not vary much fora minimal input variation between0% (all SIMULINK computation lead

    to a FLUX computation) and 20%.This method may reducedramatically the simulationtime, mainly if the systemdoes not vary much duringlong period of time.

    And more

    By the way, before theceremony finishes, FLUXto SIMULINK is mainlydedicated to drive andcontrol. So for our cables,with those strange currents,we add a simple PIDcontroller (only proportionalactually), and we can smooththe current enough so thatit is nearly sinusoidal (seefigure 6.)

    CEDRAT loves good storieswith happy ends

    This later definition corresponds infact to the previous version, with aconstant value of the time step.

    - The wedding ring

    The previous FLUX to SIMULINKTechnology had one main drawback:for each SIMULINK computation,there were one FLUX computation.And it could lead sometimes to quitelong computation.Controlling the value of the time stepwill now reduce the computationtime. And a new option will also help

    you to save time: the possibility torun several SIMULINK computationfor one FLUX computation.SIMULINK computations are shorterthan FLUXs. The principle is thento prevent from doing a FLUXcomputation if it is not needed.And how do we define when it isneeded? Using this little magic box

    We are pleased to invite you to visit our exhibitionstand (hall 2, stand 07) at POWER EXPO 2004, the4th international energy and power conference and

    exhibition. This event will be held in Zaragoza (Spain) duringSeptember 22nd-24th.

    The aim of this fair is to heighten awareness of the need forefficient, sustainable power production and utilisation systems,

    disseminate the technological advances and promote thecommercial interchanges that lead to more efficient, diversified,decentralised and environment-friendly power projects.

    To get more information, please do not hesitate to visitwww.powerexpo.org.

    Power Expo 2004".

    Figure 4: Curve of the current in the sinefed cable. We can see that the time step

    varies.

    Figure 6 : Control of the output current usingPID controller and result.

    Figure 5: Current in the first conductorfor varying value of the minimal input

    variation.