- Signal logging in Simulink: http://www.mathworks.com/help/simulink/signal-logging.html Using signal logging, you can save the signal data for post-processing.
- Simulation Data Inspector: http://www.mathworks.com/help/simulink/validate-system-behavior.htmlSimulation Data Inspector is a post-processing tool which lets you record and compare simulation data. For a programmatic workflow, you might be interested in the API: http://www.mathworks.com/help/simulink/ug/record-and-inspect-signal-data-programmatically.html
- Signal Builder block: http://www.mathworks.com/help/simulink/gs/overview.htmlThere is a tutorial on how you can use Signal Builder block and SDI to run test simulations and then compare the results: http://www.mathworks.com/help/simulink/gs/overview.html
- You might also be interested in Simulink Verification and Validation: http://www.mathworks.com/products/simverification/description5.html. You can automate the harness model generation through the functions in this tool. This will probably address your concern about creation of the wrapper model for unit testing.
Testing large-scale models in SIMULINK
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mohammed Manna
el 15 de Sept. de 2013
We are creating a synthetic envrionment where all our subsystems are software models (i.e. no actual physical system is present). In the previous designs of our system, the component models were done in C. To improve our approach, we hae decided to take SIMULINK approach and see how much we can improve in efficiency. The confusions we are faced with are:
1) Testing - How to unit-test a large scale and multirate system in SIMULINK without involving HIL and PIL testing (i.e. xPC target)? What we have done so far is create a wrapper model which will then connect to a set of CONSTANT/STEP/SEQUENCE STAIR blocks (i.e. test inputs) in SIMULINK and displays outputs (after simulation run) in a scope. Is that what SIMULINK is actually useful for? Because it took us a long time to knock out that test model. Are you supposed to do testing like this?
2) Understanding the correct use of SIMULINK - Because we are creating a software model of one/many physical systems and then joining them together to complete integration, we don't have the luxury to do HIL or PIL testing as there is no proper interface. But, we do need the generated C code because our target computer (i.e. the one which will be used to run the simulation) can use C code. In a case like ours, can we even use SIMULINK or is it atually not fit for purpose for this case? Because, we are starting to think that it may not be.
P.S. I have visited a lot of SIMULINK tutorial videos and it seems that everything is pointing to using different blocksets (e.g. SimMechanics, Simelectronics, SimHydraulics, xPC target) for HIL and PIL testing instead of focusing on old fashioned black-box testing a SIMULINK model. What is the solution for testing a large-scale model without HIL or PIL?
0 comentarios
Respuesta aceptada
Abhishek
el 17 de Sept. de 2013
For testing Simulink models, there are a few features in Simulink which might help you:
To answer your second question, Simulink is perfect for your use case. I am not sure I understand the part “..we don't have the luxury to do HIL or PIL testing as there is no proper interface”. If you are interested in generating C code and run it on a target computer, I would recommend taking a look at one of our products called “Embedded Coder”: http://www.mathworks.com/products/embedded-coder/. Here is a quick introduction to Embedded coder: http://www.mathworks.com/videos/introduction-to-embedded-coder-68810.html
I hope it helps answer your questions.
Thanks,
4 comentarios
Nathan Crosty
el 17 de Sept. de 2013
Really that is the main purpose of "Simulink..." it is to be able to "Simulate" your model. That means, solving using ODE's in a non-real time configuration. I think that you should take some of the keywords and do some reading. Look up ODE, Simulation, Closed Loop Model, Model in the Loop. That should be a good start.
Más respuestas (1)
Jens
el 13 de En. de 2014
Editada: Jens
el 13 de En. de 2014
It seems like you are looking for a testing tool that provides closed loop as well as real-time functionalities. TPT is such a testing and verification tool for Simulink models in MiL, SiL, PiL and xPC Target. TPT can be used with or without models of the environment and can be applied to all systems that can be executed and simulated in Simulink.
0 comentarios
Ver también
Categorías
Más información sobre Test Model Components en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!