SlideShare a Scribd company logo
1 of 4
Download to read offline
Stateless model with StateAMS
                                    Michael Domnitei, CAE, Hillsboro,OR.

Abstract
The idea behind StateAMS is to allow an easy way for the creation of mixed-signal models based on
finite state machines and equations. The tool generates models for the following hardware description
languages:
MAST, VHDL-AMS and Verilog-A.
However, in cases of systems with no events in the behavior, stateless models can also be generated
with the StateAMS tool. The following stateless model was created for an aerospace defense customer
and proved to be very accurate since it matched 100% the mathematical solution obtained by the
customer using Mathcad.
Introduction
The challenge encountered in this case was the need to create an average model based on the following
rational integral:
                        1.5   D
                                2      π
                                         (V p ⋅ sin θ ) 2
                         π 2 ⋅ L ⋅ f ∫ V o − V p ⋅ sin θ
              i out   =     ⋅        ⋅                    ⋅ dθ
                                       0

where:
i out is the current on the load attached to this system
Vp = 110V is the input voltage.
Vo = 300V is the output voltage
     Vo
D=      is the feedback voltage for the average model.
     Vp
L and f are given constants for the system.
In order to simplify the calculation one can introduce a few substitutions which would also make the
modeling process easier:

                                                          π (Vp ⋅sin θ)2
k=
   1.5
       , b=
             D 2 , which gives us:          iout = k ⋅ b ⋅ ∫                ⋅ dθ
    π       2 ⋅ L ⋅f                                      0  Vo − Vp ⋅sin θ

Since MAST does not have an operator for integral calculation, a straightforward way to calculate this
defined integral is by using the Riemann approximation method (sum of rectangular areas). We can
divide the definition interval (0, π) in 20 equal sub-intervals of π/20 DQG HVWLPDWH WKH LQWHJUDO DV D VXP
of rectangles below the curve:
               π
                   (Vp ⋅ sin θ) 2              π
                                               (sin θ)2
               ∫ Vo − Vp ⋅ sin θ ⋅ dθ = Vp ⋅ ∫ D − sin θ ⋅ dθ
               0                             0

                                           Vo
where we made the substitution: D =           as defined above.
                                           Vp
Modeling process
Using the sum of rectangular areas, the rational integral can be approximated as follows:
                                                  i
               π                             (sin π)2
                 (sin θ) 2           π 20        20
               ∫ D − sin θ ⋅ dθ = 20 i∑1 =           i
                                                       π
               0                            D − sin π
                                                    20
At this point in time we can see that the original problem has become:
                                           i
                                     (sin π)2
                              π 20        20
              iout = k ⋅b⋅      ∑                 π
                             20 i =1           i
                                     D − sin π
                                              20
The system requirements point to a model topology with 3 conservative ports:
    - input voltage (Vp)
    - output voltage (Vo)
    - feedback (duty) voltage
Since b and D depend on the input and output voltages, they will be defined as continuous variable.
Our main continuous variable is i out which is the sum of the 20 components (i1,i2,…i20).
The static variables of our model are:
    - n (the number of sub-intervals)
    - π (defined as 3.14)
    - L, f, and k are constants which have been introduced in the beginning.
There are no states defined or specified for the behavioral description of this model. However, with all
the information provided, we can create a stateless model using StateAMS tool.

Following is the template auto-generated by the StateAMS tool:
# Created with StateAMS 1.5.

element template integral in out vduty = pi, n, l, f
electrical in, out, vduty
number pi=3.14159, n=20, l=18e-6, f=50e3
{
    val v vp, vo, duty
    val i iout
    val nu i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, a, b, i11, i12, i13, i14, i15,
i16, i17, i18, i19, i20
    number k
    parameters {
        k=1.5/pi
    }
    values {
        vp=v(in)
        vo=v(out)
        duty=v(vduty)
        a=vo/(vp+1p)
        b=0.5*duty**2/l/f
        i1=sin(pi/n)**2/(a-sin(pi/n))
        i2=sin(2*pi/n)**2/(a-sin(2*pi/n))
        i3=sin(3*pi/n)**2/(a-sin(3*pi/n))
        i4=sin(4*pi/n)**2/(a-sin(4*pi/n))
        i5=sin(5*pi/n)**2/(a-sin(5*pi/n))
        i6=sin(6*pi/n)**2/(a-sin(6*pi/n))
        i7=sin(7*pi/n)**2/(a-sin(7*pi/n))
        i8=sin(8*pi/n)**2/(a-sin(8*pi/n))
        i9=sin(9*pi/n)**2/(a-sin(9*pi/n))
        i10=sin(10*pi/n)**2/(a-sin(10*pi/n))
i11=sin(11*pi/n)**2/(a-sin(11*pi/n))
        i12=sin(12*pi/n)**2/(a-sin(12*pi/n))
        i13=sin(13*pi/n)**2/(a-sin(13*pi/n))
        i14=sin(14*pi/n)**2/(a-sin(14*pi/n))
        i15=sin(15*pi/n)**2/(a-sin(15*pi/n))
        i16=sin(16*pi/n)**2/(a-sin(16*pi/n))
        i17=sin(17*pi/n)**2/(a-sin(17*pi/n))
        i18=sin(18*pi/n)**2/(a-sin(18*pi/n))
        i19=sin(19*pi/n)**2/(a-sin(19*pi/n))
        i20=sin(20*pi/n)**2/(a-sin(20*pi/n))


iout=pi*vp*b*k*(i1+i2+i3+i4+i5+i6+i7+i8+i9+i10+i11+i12+i13+i14+i15+i16+i17+i18+i19
+i20)/n
    }
    equations {
        i(out)+=iout
    }
}
STATELESS Stateless Model Approximates Integral

More Related Content

What's hot

Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...wvanroos
 
86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuits86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuitsLekashri Subramanian
 
Lab 4 Three-Bit Binary Adder
Lab 4 Three-Bit Binary AdderLab 4 Three-Bit Binary Adder
Lab 4 Three-Bit Binary AdderKatrina Little
 
Application of Non-linear Electronics in Digital Communication
Application of Non-linear Electronics in Digital CommunicationApplication of Non-linear Electronics in Digital Communication
Application of Non-linear Electronics in Digital CommunicationMohammad reza Zahabi
 
Senior design project code for PPG
Senior design project code for PPGSenior design project code for PPG
Senior design project code for PPGFrankDin1
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)asghar123456
 
The Magic of Auto Differentiation
The Magic of Auto DifferentiationThe Magic of Auto Differentiation
The Magic of Auto DifferentiationSanyam Kapoor
 
Playing with camera preview buffers on BlackBerry 10
Playing with camera preview buffers on BlackBerry 10Playing with camera preview buffers on BlackBerry 10
Playing with camera preview buffers on BlackBerry 10Raimon Ràfols
 
Circular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeCircular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeBharti Airtel Ltd.
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Bharti Airtel Ltd.
 
Inception assignment
Inception assignmentInception assignment
Inception assignmentEsraa Yessin
 
THIS is for innovation project to aplly critical thinking project
THIS is for innovation project to aplly critical thinking project THIS is for innovation project to aplly critical thinking project
THIS is for innovation project to aplly critical thinking project Esraa Yessin
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureanishgoel
 

What's hot (19)

Aula3
Aula3Aula3
Aula3
 
Random variate generation
Random variate generationRandom variate generation
Random variate generation
 
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
Invited presentation at SIAM PP 18: Communication Hiding Through Pipelining i...
 
86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuits86254 162058-ee2255-digital-logic-circuits
86254 162058-ee2255-digital-logic-circuits
 
Lab 4 Three-Bit Binary Adder
Lab 4 Three-Bit Binary AdderLab 4 Three-Bit Binary Adder
Lab 4 Three-Bit Binary Adder
 
Application of Non-linear Electronics in Digital Communication
Application of Non-linear Electronics in Digital CommunicationApplication of Non-linear Electronics in Digital Communication
Application of Non-linear Electronics in Digital Communication
 
Senior design project code for PPG
Senior design project code for PPGSenior design project code for PPG
Senior design project code for PPG
 
MFC Map2
MFC Map2MFC Map2
MFC Map2
 
Pre-Calc 30S May 2
Pre-Calc 30S May 2Pre-Calc 30S May 2
Pre-Calc 30S May 2
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)
 
Unit2
Unit2Unit2
Unit2
 
The Magic of Auto Differentiation
The Magic of Auto DifferentiationThe Magic of Auto Differentiation
The Magic of Auto Differentiation
 
Playing with camera preview buffers on BlackBerry 10
Playing with camera preview buffers on BlackBerry 10Playing with camera preview buffers on BlackBerry 10
Playing with camera preview buffers on BlackBerry 10
 
Circular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab CodeCircular convolution Using DFT Matlab Code
Circular convolution Using DFT Matlab Code
 
Ejercicios
EjerciciosEjercicios
Ejercicios
 
Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder Verilog VHDL code Parallel adder
Verilog VHDL code Parallel adder
 
Inception assignment
Inception assignmentInception assignment
Inception assignment
 
THIS is for innovation project to aplly critical thinking project
THIS is for innovation project to aplly critical thinking project THIS is for innovation project to aplly critical thinking project
THIS is for innovation project to aplly critical thinking project
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lecture
 

Similar to STATELESS Stateless Model Approximates Integral

Prévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAMPrévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAMCdiscount
 
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfreservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfRTEFGDFGJU
 
A MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD LibraryA MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD LibraryKen Friis Larsen
 
06_finite_elements_basics.ppt
06_finite_elements_basics.ppt06_finite_elements_basics.ppt
06_finite_elements_basics.pptAditya765321
 
Electrical Engineering Assignment Help
Electrical Engineering Assignment HelpElectrical Engineering Assignment Help
Electrical Engineering Assignment HelpEdu Assignment Help
 
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdfLECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdfanuj298979
 
4 analysis of laminates
4 analysis of laminates4 analysis of laminates
4 analysis of laminatesMadi Na
 
sublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energiessublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energiesFujimoto Keisuke
 
W ee network_theory_10-06-17_ls2-sol
W ee network_theory_10-06-17_ls2-solW ee network_theory_10-06-17_ls2-sol
W ee network_theory_10-06-17_ls2-solAnkit Chaurasia
 
A non-stiff numerical method for 3D interfacial flow of inviscid fluids.
A non-stiff numerical method for 3D interfacial flow of inviscid fluids.A non-stiff numerical method for 3D interfacial flow of inviscid fluids.
A non-stiff numerical method for 3D interfacial flow of inviscid fluids.Alex (Oleksiy) Varfolomiyev
 
Computational electromagnetics
Computational electromagneticsComputational electromagnetics
Computational electromagneticsSpringer
 
Bayesian Inference and Uncertainty Quantification for Inverse Problems
Bayesian Inference and Uncertainty Quantification for Inverse ProblemsBayesian Inference and Uncertainty Quantification for Inverse Problems
Bayesian Inference and Uncertainty Quantification for Inverse ProblemsMatt Moores
 
Lecture_10_Parallel_Algorithms_Part_II.ppt
Lecture_10_Parallel_Algorithms_Part_II.pptLecture_10_Parallel_Algorithms_Part_II.ppt
Lecture_10_Parallel_Algorithms_Part_II.pptWahyuAde4
 
Network Information Processing
Network Information ProcessingNetwork Information Processing
Network Information ProcessingReza Rahimi
 
An Introduction to Elleptic Curve Cryptography
An Introduction to Elleptic Curve CryptographyAn Introduction to Elleptic Curve Cryptography
An Introduction to Elleptic Curve CryptographyDerek Callaway
 
Design and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptDesign and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptsrushtiivp
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment HelpMaths Assignment Help
 

Similar to STATELESS Stateless Model Approximates Integral (20)

Prévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAMPrévision de consommation électrique avec adaptive GAM
Prévision de consommation électrique avec adaptive GAM
 
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdfreservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
reservoir-modeling-using-matlab-the-matalb-reservoir-simulation-toolbox-mrst.pdf
 
A MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD LibraryA MuDDy Experience - ML Bindings to a BDD Library
A MuDDy Experience - ML Bindings to a BDD Library
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
06_finite_elements_basics.ppt
06_finite_elements_basics.ppt06_finite_elements_basics.ppt
06_finite_elements_basics.ppt
 
5994944.ppt
5994944.ppt5994944.ppt
5994944.ppt
 
Electrical Engineering Assignment Help
Electrical Engineering Assignment HelpElectrical Engineering Assignment Help
Electrical Engineering Assignment Help
 
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdfLECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
LECTURE_NOTES_ON_HIGH_VOLTAGE_ENGINEERIN.pdf
 
4 analysis of laminates
4 analysis of laminates4 analysis of laminates
4 analysis of laminates
 
sublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energiessublabel accurate convex relaxation of vectorial multilabel energies
sublabel accurate convex relaxation of vectorial multilabel energies
 
W ee network_theory_10-06-17_ls2-sol
W ee network_theory_10-06-17_ls2-solW ee network_theory_10-06-17_ls2-sol
W ee network_theory_10-06-17_ls2-sol
 
A non-stiff numerical method for 3D interfacial flow of inviscid fluids.
A non-stiff numerical method for 3D interfacial flow of inviscid fluids.A non-stiff numerical method for 3D interfacial flow of inviscid fluids.
A non-stiff numerical method for 3D interfacial flow of inviscid fluids.
 
Computational electromagnetics
Computational electromagneticsComputational electromagnetics
Computational electromagnetics
 
Bayesian Inference and Uncertainty Quantification for Inverse Problems
Bayesian Inference and Uncertainty Quantification for Inverse ProblemsBayesian Inference and Uncertainty Quantification for Inverse Problems
Bayesian Inference and Uncertainty Quantification for Inverse Problems
 
Lecture_10_Parallel_Algorithms_Part_II.ppt
Lecture_10_Parallel_Algorithms_Part_II.pptLecture_10_Parallel_Algorithms_Part_II.ppt
Lecture_10_Parallel_Algorithms_Part_II.ppt
 
Network Information Processing
Network Information ProcessingNetwork Information Processing
Network Information Processing
 
An Introduction to Elleptic Curve Cryptography
An Introduction to Elleptic Curve CryptographyAn Introduction to Elleptic Curve Cryptography
An Introduction to Elleptic Curve Cryptography
 
Design and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt pptDesign and analysis of algorithm ppt ppt
Design and analysis of algorithm ppt ppt
 
Bode plot
Bode plot Bode plot
Bode plot
 
Differential Equations Assignment Help
Differential Equations Assignment HelpDifferential Equations Assignment Help
Differential Equations Assignment Help
 

STATELESS Stateless Model Approximates Integral

  • 1. Stateless model with StateAMS Michael Domnitei, CAE, Hillsboro,OR. Abstract The idea behind StateAMS is to allow an easy way for the creation of mixed-signal models based on finite state machines and equations. The tool generates models for the following hardware description languages: MAST, VHDL-AMS and Verilog-A. However, in cases of systems with no events in the behavior, stateless models can also be generated with the StateAMS tool. The following stateless model was created for an aerospace defense customer and proved to be very accurate since it matched 100% the mathematical solution obtained by the customer using Mathcad. Introduction The challenge encountered in this case was the need to create an average model based on the following rational integral: 1.5 D 2 π (V p ⋅ sin θ ) 2 π 2 ⋅ L ⋅ f ∫ V o − V p ⋅ sin θ i out = ⋅ ⋅ ⋅ dθ 0 where: i out is the current on the load attached to this system Vp = 110V is the input voltage. Vo = 300V is the output voltage Vo D= is the feedback voltage for the average model. Vp L and f are given constants for the system. In order to simplify the calculation one can introduce a few substitutions which would also make the modeling process easier: π (Vp ⋅sin θ)2 k= 1.5 , b= D 2 , which gives us: iout = k ⋅ b ⋅ ∫ ⋅ dθ π 2 ⋅ L ⋅f 0 Vo − Vp ⋅sin θ Since MAST does not have an operator for integral calculation, a straightforward way to calculate this defined integral is by using the Riemann approximation method (sum of rectangular areas). We can divide the definition interval (0, π) in 20 equal sub-intervals of π/20 DQG HVWLPDWH WKH LQWHJUDO DV D VXP of rectangles below the curve: π (Vp ⋅ sin θ) 2 π (sin θ)2 ∫ Vo − Vp ⋅ sin θ ⋅ dθ = Vp ⋅ ∫ D − sin θ ⋅ dθ 0 0 Vo where we made the substitution: D = as defined above. Vp
  • 2. Modeling process Using the sum of rectangular areas, the rational integral can be approximated as follows: i π (sin π)2 (sin θ) 2 π 20 20 ∫ D − sin θ ⋅ dθ = 20 i∑1 = i π 0 D − sin π 20 At this point in time we can see that the original problem has become: i (sin π)2 π 20 20 iout = k ⋅b⋅ ∑ π 20 i =1 i D − sin π 20 The system requirements point to a model topology with 3 conservative ports: - input voltage (Vp) - output voltage (Vo) - feedback (duty) voltage Since b and D depend on the input and output voltages, they will be defined as continuous variable. Our main continuous variable is i out which is the sum of the 20 components (i1,i2,…i20). The static variables of our model are: - n (the number of sub-intervals) - π (defined as 3.14) - L, f, and k are constants which have been introduced in the beginning. There are no states defined or specified for the behavioral description of this model. However, with all the information provided, we can create a stateless model using StateAMS tool. Following is the template auto-generated by the StateAMS tool: # Created with StateAMS 1.5. element template integral in out vduty = pi, n, l, f electrical in, out, vduty number pi=3.14159, n=20, l=18e-6, f=50e3 { val v vp, vo, duty val i iout val nu i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, a, b, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20 number k parameters { k=1.5/pi } values { vp=v(in) vo=v(out) duty=v(vduty) a=vo/(vp+1p) b=0.5*duty**2/l/f i1=sin(pi/n)**2/(a-sin(pi/n)) i2=sin(2*pi/n)**2/(a-sin(2*pi/n)) i3=sin(3*pi/n)**2/(a-sin(3*pi/n)) i4=sin(4*pi/n)**2/(a-sin(4*pi/n)) i5=sin(5*pi/n)**2/(a-sin(5*pi/n)) i6=sin(6*pi/n)**2/(a-sin(6*pi/n)) i7=sin(7*pi/n)**2/(a-sin(7*pi/n)) i8=sin(8*pi/n)**2/(a-sin(8*pi/n)) i9=sin(9*pi/n)**2/(a-sin(9*pi/n)) i10=sin(10*pi/n)**2/(a-sin(10*pi/n))
  • 3. i11=sin(11*pi/n)**2/(a-sin(11*pi/n)) i12=sin(12*pi/n)**2/(a-sin(12*pi/n)) i13=sin(13*pi/n)**2/(a-sin(13*pi/n)) i14=sin(14*pi/n)**2/(a-sin(14*pi/n)) i15=sin(15*pi/n)**2/(a-sin(15*pi/n)) i16=sin(16*pi/n)**2/(a-sin(16*pi/n)) i17=sin(17*pi/n)**2/(a-sin(17*pi/n)) i18=sin(18*pi/n)**2/(a-sin(18*pi/n)) i19=sin(19*pi/n)**2/(a-sin(19*pi/n)) i20=sin(20*pi/n)**2/(a-sin(20*pi/n)) iout=pi*vp*b*k*(i1+i2+i3+i4+i5+i6+i7+i8+i9+i10+i11+i12+i13+i14+i15+i16+i17+i18+i19 +i20)/n } equations { i(out)+=iout } }