DOC PREVIEW
Berkeley ELENG C249A - Study of Simulink™ Discrete System MOC with Metropolis

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Study of Simulink™ Discrete System MOC with MetropolisOutlineMotivationIntroductionSlide 5Discrete System in Simulink™Slide 7Metropolis meta-modelDiscrete MOC in Metropolis IDiscrete MOC in Metropolis IISlide 11An Example ModelMetropolis MMM NetlistComparisonA Tool for Transformation from Simulink models into Metropolis modelsDesign of the Tool Data Dependency AnalysisSlide 17Demos (Results)Slide 19Acknowledgement & ConclusionStudy of Simulink™ Discrete System MOC with MetropolisHaiyang Zheng [email protected]: Luciano Lavagno [email protected] Felice Balarin [email protected]•Motivation and Introduction•Simulink Discrete System MOC•MOC Implementation in Metropolis•A tool for automatic transformation of Simulink models into Metropolis models•Simulation Demos•Acknowledgement and ConclusionMotivation•Simulink MOC is a heterogeneous one. A non-trivial model contains both discrete and continuous models.•A complex mixture model is usually hard to design, understand, and maintain. •A better way is to use some simpler, better defined MOCs to model different parts of the complex system.Introduction•Discrete time points•Continuous time intervals•We choose purely discrete (sampled data) system as the study object.t0t1t2t3tDiscrete time pointsx = 4, y = x - 2Continuous time intervaldy / dt = x + 1Outline•Motivation and Introduction•Simulink Discrete System MOC•MOC Implementation in Metropolis•A tool for automatic transformation of Simulink models into Metropolis models•Simulation Demos•Acknowledgement and ConclusionDiscrete System in Simulink™•Each block in the block diagram has a sample time, the rate at which it executes during simulation.•Multi-rate discrete systems contain blocks sampled at different rates.•Simulator takes the simulation step as the fundamental sample time, the greatest common divisor of the system’s actual sample times. T = 0.5 T = 0.25 T = 0.75ABCOutline•Motivation and Introduction•Simulink Discrete System MOC•MOC Implementation in Metropolis•A tool for automatic transformation of Simulink models into Metropolis models•Simulation Demos•Acknowledgement and ConclusionMetropolis meta-model•Netlist: design of model (aggregation of objects and ports)•Objects–Process: thread doing computation–Medium: •Media for communication between processes•State Media for communication between process and scheduler–Scheduler: defines policies to satisfy constraints•Port Interface –provides functions reference of other objects •ConstraintDiscrete MOC in Metropolis I•Processes communicate through channels, the medium.•Each process has a period parameter, which is stored in the associated state medium.SchedulerT = 0.5, State T = 1.0, StateRead, WriteState MediumChannel (Media)Process A Process BDiscrete MOC in Metropolis II•The scheduler calculates the schedule based on the sampled rates and invokes different processes periodically. •The scheduler forces the finish of execution of processes to ensure the data precedence. •The data dependency is not analyzed in the scheduler but in the model design phase. T0 = 0.5T = 0.5 T = 1.0AB P = T/T0 = 1AB P = T/T0 = 2 A A BSchedulerOutline•Motivation and Introduction•Simulink Discrete System MOC•MOC Implementation in Metropolis•A tool for automatic transformation of Simulink models into Metropolis models•Simulation Demos•Acknowledgement and ConclusionAn Example ModelT = 0.5T = 1.0T = 1.0T = 1.01234Metropolis MMM Netlistpublic netlist simple { public simple (String name) { dtScheduler dtscheduler = new dtScheduler("dtscheduler", 4); addcomponent (dtscheduler, this); RampProcess DiscreteRamp = new RampProcess("DiscreteRamp", 0, 2); addcomponent(DiscreteRamp,this,"DiscreteRamp"); dtStateMedium s0 = new dtStateMedium("StateMedium0", 0.25); addcomponent (s0, this); connect (DiscreteRamp,smport,s0); connect (dtscheduler, StateMedium[0], s0); connect (dtscheduler, processPeriod[0], s0); …… dtchannel c0 = new dtchannel("c0"); addcomponent(c0,this,"channel0"); connect(DiscreteSubtract,outports[0],c0); connect(Scope,inports[0],c0); …… }}T = 0.5T = 1.0T = 1.0T = 1.01234An automatic transformation from the block diagramrepresentation to the text representation is necessary.Comparison•Transformation from Simlink Models into XML representations using MatlabUDM, a tool from Vanderbilt University.•Transformation from XML representations into Metropolis MMM netlists with XSLT based tool.•Two contributions:–It bridges the tools of Simulink and Metropolis with XML.–It sorts the blocks based on data dependency analysis.A Tool for Transformation from Simulink models into Metropolis models•Conditions for processes to be ready to execute–There is no input.–All inputs are available.•Algorithm:–Construct a status array with length as the number of processes and initiate it with O indicating the process not scheduled.–Iterate the processes with given order, mark the ready process as Y, and schedule it. Repeat until all processes are marked and scheduled.Design of the Tool Data Dependency AnalysisGiven order of blocks as BCAD.T = 0.5T = 1.0T = 1.0T = 1.01234ABCDOOOO OOOOB COOOOOOYOADOOYOBYOYOYYYOCAYYYODYYYY(#)The sorted block order is ABCD.Outline•Motivation and Introduction•Simulink Discrete System MOC•MOC Implementation in Metropolis•A tool for automatic transformation of Simulink models into Metropolis models•Simulation Demos•Acknowledgement and ConclusionDemos (Results)•A Simulink Model–Simulation result •A Metropolis Model–Simulation with code generated from SystemCResult of Ramp is: 1Result of Ramp is: 2Result of Gain is: 4Result of Subtract is: 2Outputis: 2Result of Ramp is: 3Result of Ramp is: 4Result of Gain is: 8Result of Subtract is: 4Outputis: 4Result of Ramp is: 5Result of Ramp is: 6Result of Gain is: 12Result of Subtract is: 6Outputis: 6Outline•Motivation and Introduction•Simulink Discrete System MOC•MOC Implementation in Metropolis•A tool for automatic transformation of Simulink models into Metropolis models•Simulation Demos•Acknowledgement and ConclusionAcknowledgement & Conclusion•Thanks to:–Advice from Luciano Lavagno and Felice Balarin.–Guang Yang’s help on the C-code generation of Metropolis models with SystemC.–ISIS of Vanderbilt University providing the MatlabUDM tool.•A Discrete (Sampled Data) MOC is


View Full Document

Berkeley ELENG C249A - Study of Simulink™ Discrete System MOC with Metropolis

Documents in this Course
Load more
Download Study of Simulink™ Discrete System MOC with Metropolis
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study of Simulink™ Discrete System MOC with Metropolis and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study of Simulink™ Discrete System MOC with Metropolis 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?