ChE 436: Simulation Labs

Main.SimulationLab History

Hide minor edits - Show changes to output

June 21, 2020, at 05:03 AM by 136.36.211.159 -
Deleted lines 121-139:

----

(:html:)
 <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)
Changed lines 98-99 from:
* %list list-page% [[Attach:LabSim8.pdf | Simulation Lab 8]]
* %list list-page% [[Attach:LabSim8.zip | Supplemental Files]]
to:
* %list list-page% [[https://apm.byu.edu/prism/index.php/Projects/DrillingAutomation | Simulation Lab 8]]
* %list list-page% [[https://github.com/APMonitor/applications/tree/master/drillstring_and_hydraulics | Supplemental Files]]
Added line 9:
* [[Attach:simulation_control_lab.pdf | Simulation Control Lab Guidelines]]
December 09, 2014, at 08:23 PM by 10.10.149.147 -
Added lines 8-11:

* [[Attach:simulation_control_lab_rubric.pdf | Simulation Control Lab Grading Sheet]]
** 2 page Executive Summary
** 5 minute Presentation
November 26, 2014, at 05:09 PM by 107.188.175.164 -
Deleted lines 116-159:

----

!! Programming Help

Below are a few examples of Simulink and MATLAB programs that can help with projects. Common questions for the simulation labs include how to import data, export results, and configuring more complex systems.

!!! Import Data File into Simulink

Data such as any custom time series can be imported into Simulink. In this example, an Interpreted MATLAB Function block is used to read a data file (data.txt) and interpolate with a linear approximation between the two nearest points.

* %list list-page% [[Attach:interpreted_Simulink_MATLAB.zip | Download Interpreted Function Example (Simulink/MATLAB)]]

->[[Attach:interpreted_Simulink_MATLAB.zip | Attach:interpreted_Simulink_MATLAB.png]]

!!! Embedding Custom Functions (MATLAB scripts)

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/XfG9fO4bcNk?rel=0" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

!!! Example MIMO System

The following Simulink model is an example of a Multiple-Input Multiple-Output system. The first block is an example of two decoupled PID controllers (non-interacting) while the second block is an example of interacting PID controllers with feedforward gains.

[[Attach:interacting_controllers.zip | Download Interacting Control Example (Simulink)]]

Attach:interacting_controllers.png

!!! Exporting Data from MATLAB / Simulink

You may want to export data from MATLAB or Simulink to combine plots or for further manipulation in another program like Excel. One way is shown below:

Step 1: Drop the "to Workspace" blocks into Simulink and re-run the simulation. The requested variables will be exported to the MATLAB workspace.

Attach:simulink_to_workspace.png

Step 2: From the MATLAB command prompt, view the "input" and "output" data that was generated from the Simulink simulation. Type "input" or "output" to inspect the information that is contained in the variable structure.

Attach:matlab_input_data.png

Step 3: Save the data to a text file. One way is to construct all of the data that will be saved into a data matrix and then export as an ASCII text file (tab delimited). Make sure your current directory allows you to save a file (is not write-restricted) or it will return an error.

Attach:matlab_save_data.png
November 26, 2014, at 05:03 PM by 107.188.175.164 -
Changed lines 15-17 from:
* [[Attach:LabSim1.pdf | Simulation Lab 1]]
* [[Attach:LabSim1b.zip | Supplemental Files]]
to:
* %list list-page% [[Attach:LabSim1.pdf | Simulation Lab 1]]
* %list list-page% [[Attach:LabSim1b.zip | Supplemental Files]]
Changed lines 26-28 from:
* [[Attach:LabSim2.pdf | Simulation Lab 2]]
* [[Attach:LabSim2.zip | Supplemental Files]]
to:
* %list list-page% [[Attach:LabSim2.pdf | Simulation Lab 2]]
* %list list-page% [[Attach:LabSim2.zip | Supplemental Files]]
Changed lines 37-39 from:
* [[Attach:LabSim3.pdf | Simulation Lab 3]]
* [[Attach:LabSim3.zip | Supplemental Files]]
to:
* %list list-page% [[Attach:LabSim3.pdf | Simulation Lab 3]]
* %list list-page% [[Attach:LabSim3.zip | Supplemental Files]]
Changed lines 48-51 from:
* [[Attach:LabSim4.pdf | Simulation Lab 4]]
* [[Attach:LabSim4.zip | Supplemental Files - MATLAB]]
* [[Attach:LabSim4_Simulink.zip | Supplemental Files - Simulink]]
to:
* %list list-page% [[Attach:LabSim4.pdf | Simulation Lab 4]]
* %list list-page% [[Attach:LabSim4.zip | Supplemental Files - MATLAB]]
* %list list-page% [[Attach:LabSim4_Simulink.zip | Supplemental Files - Simulink]]
Changed lines 60-62 from:
* [[Attach:LabSim5.pdf | Simulation Lab 5]]
* [[Attach:LabSim5.zip | Supplemental Files - Simulink]]
to:
* %list list-page% [[Attach:LabSim5.pdf | Simulation Lab 5]]
* %list list-page% [[Attach:LabSim5.zip | Supplemental Files - Simulink]]
Changed lines 71-73 from:
* [[Attach:LabSim6.pdf | Simulation Lab 6]]
* [[Attach:LabSim6.zip | Supplemental Files]]
to:
* %list list-page% [[Attach:LabSim6.pdf | Simulation Lab 6]]
* %list list-page% [[Attach:LabSim6.zip | Supplemental Files]]
Changed lines 82-84 from:
* [[Attach:LabSim7.pdf | Simulation Lab 7]]
* [[Attach:LabSim7.zip | Supplemental Files]]
to:
* %list list-page% [[Attach:LabSim7.pdf | Simulation Lab 7]]
* %list list-page% [[Attach:LabSim7.zip | Supplemental Files]]
Changed lines 93-95 from:
* [[Attach:LabSim8.pdf | Simulation Lab 8]]
* [[Attach:LabSim8.zip | Supplemental Files]]
to:
* %list list-page% [[Attach:LabSim8.pdf | Simulation Lab 8]]
* %list list-page% [[Attach:LabSim8.zip | Supplemental Files]]
Changed lines 120-121 from:
!! Example MIMO System
to:
!! Programming Help

Below are a few examples of Simulink and MATLAB programs that can help with projects. Common questions for the simulation labs include how to import data, export results, and configuring more complex systems.

!!! Import Data File into Simulink

Data such as any custom time series can be imported into Simulink. In this example, an Interpreted MATLAB Function block is used to read a data file (data.txt) and interpolate with a linear approximation between the two nearest points.

* %list list-page% [[Attach:interpreted_Simulink_MATLAB.zip | Download Interpreted Function Example (Simulink/MATLAB)]]

->[[Attach:interpreted_Simulink_MATLAB.zip | Attach:interpreted_Simulink_MATLAB.png]]

!!! Embedding Custom Functions (MATLAB scripts)

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/XfG9fO4bcNk?rel=0" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

!
!! Example MIMO System
Changed line 146 from:
!! Exporting Data from MATLAB / Simulink
to:
!!! Exporting Data from MATLAB / Simulink
October 31, 2014, at 04:48 PM by 107.188.175.164 -
Added lines 8-9:

Attach:lab_project_examples.png
Added lines 96-103:
(:htmlend:)

----

!!!! Other Student Control Projects

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhUyN1Kur1XbDG4p7W9OKom" frameborder="0" allowfullscreen></iframe>
Changed lines 62-64 from:

<iframe width="560" height="315" src="//www.youtube.com/embed/yFo9vEk1cCo?rel=0" frameborder="0" allowfullscreen></iframe></iframe>
to:
<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhuPF0FV1WbxTF2Kpkodlyn" frameborder="0" allowfullscreen></iframe>
Added line 62:
Added line 64:
Changed line 97 from:
<iframe width="560" height="315" src="//www.youtube.com/embed/20n_KtEy6Y4?rel=0" frameborder="0" allowfullscreen></iframe></iframe>
to:
<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiDHXgrjmnL_NIudu43Xtu-" frameborder="0" allowfullscreen></iframe>
Changed line 73 from:
<iframe width="560" height="315" src="//www.youtube.com/embed/rim0wJxZ-O8?rel=0" frameborder="0" allowfullscreen></iframe></iframe>
to:
<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiMgiwODftWlVUrzSrqis8C" frameborder="0" allowfullscreen></iframe>
Added lines 82-85:

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDjnlnHY7L9_S6TbSzPvIlVQ" frameborder="0" allowfullscreen></iframe>
(:htmlend:)
November 21, 2013, at 02:57 PM by 128.187.97.24 -
Added lines 111-112:

Attach:interacting_controllers.png
November 21, 2013, at 02:42 PM by 128.187.97.24 -
Added lines 105-110:

!! Example MIMO System

The following Simulink model is an example of a Multiple-Input Multiple-Output system. The first block is an example of two decoupled PID controllers (non-interacting) while the second block is an example of interacting PID controllers with feedforward gains.

[[Attach:interacting_controllers.zip | Download Interacting Control Example (Simulink)]]
November 15, 2013, at 07:50 PM by 128.187.97.20 -
Changed lines 120-139 from:
Attach:matlab_save_data.png
to:
Attach:matlab_save_data.png

----

(:html:)
 <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)
November 13, 2013, at 05:51 PM by 69.169.137.17 -
Changed line 11 from:
!!!! Project 1: Friction Stir Welding
to:
!!!! Project 1: Heated Rod Temperature Control
November 13, 2013, at 05:51 PM by 69.169.137.17 -
Changed lines 11-14 from:
!!!! 5 Steps to Begin a Technical Presentation

Students have an opportunity with the second lab to share a brief presentation on their project. Below are 5 steps for beginning a technical presentation.

to:
!!!! Project 1: Friction Stir Welding

* [[Attach:LabSim1.pdf | Simulation Lab 1]]
* [[Attach:LabSim1b.zip | Supplemental Files]]

Changed line 17 from:
<iframe width="560" height="315" src="https://www.youtube.com/embed/lWBr7ploeNM" frameborder="0" allowfullscreen></iframe>
to:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiIbdwROVoQY4jKNzn_jKAq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
Changed lines 22-26 from:
!!!! Project 1: Friction Stir Welding

* [[Attach:LabSim1.pdf | Simulation Lab 1
]]
* [[Attach:LabSim1b.zip | Supplemental Files]]
to:
!!!! Project 2: Deployable Nuclear Reactor for Disaster Relief

* [[Attach:LabSim2.pdf | Simulation Lab 2
]]
* [[Attach:LabSim2.zip | Supplemental Files]]
Changed line 28 from:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiIbdwROVoQY4jKNzn_jKAq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
to:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDittrFjBmAMNJoKrxsTbOVd&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
Changed lines 33-37 from:
!!!! Project 2: Deployable Nuclear Reactor for Disaster Relief

* [[Attach:LabSim2.pdf | Simulation Lab 2]]
* [[Attach:LabSim2.zip | Supplemental Files]]
to:
!!!! Project 3: Minimizing Anti-viral use in HIV Control

* [[Attach:LabSim3.pdf | Simulation Lab 3]]
* [[Attach:LabSim3.zip | Supplemental Files]]
Changed line 39 from:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDittrFjBmAMNJoKrxsTbOVd&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
to:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhDKTVZR-E-LlR34iyC5rlq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
Deleted lines 43-53:
!!!! Project 3: Minimizing Anti-viral use in HIV Control

* [[Attach:LabSim3.pdf | Simulation Lab 3]]
* [[Attach:LabSim3.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhDKTVZR-E-LlR34iyC5rlq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

----

Added lines 96-104:
!!!! 5 Steps to Begin a Technical Presentation

Students have an opportunity with the second lab to share a brief presentation on their project. Below are 5 steps for beginning a technical presentation.

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/lWBr7ploeNM" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

----
November 13, 2013, at 02:42 PM by 69.169.137.17 -
Added lines 76-105:

!!!! Project 6: Friction Stir Welding

* [[Attach:LabSim6.pdf | Simulation Lab 6]]
* [[Attach:LabSim6.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/rim0wJxZ-O8?rel=0" frameborder="0" allowfullscreen></iframe></iframe>
(:htmlend:)

----

!!!! Project 7: Smart-Grid Energy Storage

* [[Attach:LabSim7.pdf | Simulation Lab 7]]
* [[Attach:LabSim7.zip | Supplemental Files]]

----

!!!! Project 8: Automated Pressure Control During Drilling

* [[Attach:LabSim8.pdf | Simulation Lab 8]]
* [[Attach:LabSim8.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/20n_KtEy6Y4?rel=0" frameborder="0" allowfullscreen></iframe></iframe>
(:htmlend:)

----

November 11, 2013, at 07:45 PM by 128.187.97.20 -
Added lines 66-76:
!!!! Project 5: Control of a Reservoir Network

* [[Attach:LabSim5.pdf | Simulation Lab 5]]
* [[Attach:LabSim5.zip | Supplemental Files - Simulink]]

(:html:)
<iframe width="560" height="315" src="//www.youtube.com/embed/yFo9vEk1cCo?rel=0" frameborder="0" allowfullscreen></iframe></iframe>
(:htmlend:)

----

Changed line 91 from:
Attach:matlab_save_data.png
to:
Attach:matlab_save_data.png
October 25, 2013, at 04:40 PM by 69.169.137.17 -
Changed lines 11-15 from:
!!!! Project 1: Friction Stir Welding

* [[Attach:LabSim1.pdf | Simulation Lab 1]]
* [[Attach:LabSim1b.zip | Supplemental Files]]

to:
!!!! 5 Steps to Begin a Technical Presentation

Students have an opportunity with the second lab to share a brief presentation on their project. Below are 5 steps for beginning a technical presentation.

Changed line 16 from:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiIbdwROVoQY4jKNzn_jKAq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
to:
<iframe width="560" height="315" src="https://www.youtube.com/embed/lWBr7ploeNM" frameborder="0" allowfullscreen></iframe>
Changed lines 21-25 from:
!!!! Project 2: Deployable Nuclear Reactor for Disaster Relief

* [[Attach:LabSim2.pdf | Simulation Lab 2
]]
* [[Attach:LabSim2.zip | Supplemental Files]]
to:
!!!! Project 1: Friction Stir Welding

* [[Attach:LabSim1.pdf | Simulation Lab 1
]]
* [[Attach:LabSim1b.zip | Supplemental Files]]
Changed line 27 from:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDittrFjBmAMNJoKrxsTbOVd&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
to:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiIbdwROVoQY4jKNzn_jKAq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
Changed lines 32-36 from:
!!!! Project 3: Minimizing Anti-viral use in HIV Control

* [[Attach:LabSim3.pdf | Simulation Lab 3]]
* [[Attach:LabSim3.zip | Supplemental Files]]
to:
!!!! Project 2: Deployable Nuclear Reactor for Disaster Relief

* [[Attach:LabSim2.pdf | Simulation Lab 2]]
* [[Attach:LabSim2.zip | Supplemental Files]]
Changed line 38 from:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhDKTVZR-E-LlR34iyC5rlq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
to:
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDittrFjBmAMNJoKrxsTbOVd&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
Added lines 43-53:
!!!! Project 3: Minimizing Anti-viral use in HIV Control

* [[Attach:LabSim3.pdf | Simulation Lab 3]]
* [[Attach:LabSim3.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhDKTVZR-E-LlR34iyC5rlq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

----

Deleted line 80:
Changed lines 47-48 from:
* [[Attach:LabSim4.zip | Supplemental Files]]
to:
* [[Attach:LabSim4.zip | Supplemental Files - MATLAB]]
* [[Attach:LabSim4_Simulink.zip | Supplemental Files - Simulink
]]
December 05, 2012, at 09:41 PM by 128.187.97.21 -
Deleted lines 69-73:


!! Groups for Project #2

Attach:labs_2012b.png
December 05, 2012, at 01:55 AM by 69.169.188.188 -
Changed lines 7-8 from:
Project #2 is a virtual system that can be numerically simulated. The purpose of this second lab is to apply more advanced topics that integrate the course material but do not have some of the limitations of physical systems.
to:
The second lab is a virtual system that can be investigated through numerical simulation. The purpose of this lab is to apply more advanced topics that integrate the course material but do not have some of the limitations of physical systems.

----

Added lines 20-21:
----
Added lines 31-32:
----
Added lines 42-43:
----
Added lines 52-53:

----
December 05, 2012, at 01:53 AM by 69.169.188.188 -
Changed lines 9-13 from:
* [[Attach:LabSim1.pdf | Simulation Lab 1]] | [[Attach:LabSim1b.zip | Supplemental Files]]
* [[Attach:LabSim2.pdf | Simulation Lab 2]] | [[Attach:LabSim2.zip | Supplemental Files]]
* [[Attach:LabSim3.pdf | Simulation Lab 3]] | [[Attach:LabSim3.zip | Supplemental Files]]

* [[Attach:LabSim4.pdf | Simulation Lab 4]] | [[Attach:LabSim4.zip | Supplemental Files]]
to:
!!!! Project 1: Friction Stir Welding

* [[Attach:LabSim1.pdf | Simulation Lab 1]]
* [[Attach:LabSim1b.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDiIbdwROVoQY4jKNzn_jKAq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

!!!! Project 2: Deployable Nuclear Reactor for Disaster Relief

* [[Attach:LabSim2.pdf | Simulation Lab 2]]
* [[Attach:LabSim2.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDittrFjBmAMNJoKrxsTbOVd&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

!!!! Project 3: Minimizing Anti-viral use in HIV Control

* [[Attach:LabSim3.pdf | Simulation Lab 3]]
* [[Attach:LabSim3.zip | Supplemental Files]]

(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDhDKTVZR-E-LlR34iyC5rlq&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
(:htmlend:)

!!!! Project 4: Distillation Control

* [[Attach:LabSim4.pdf | Simulation Lab 4]]
* [[Attach:LabSim4.zip | Supplemental Files]]

December 05, 2012, at 01:48 AM by 69.169.188.188 -
Added line 12:
Added lines 14-16:
(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLLBUgWXdTBDjE8W6s14ICP8SXaSD_hmAm&amp;hl=en_US" frameborder="0" allowfullscreen></iframe>
(:htmlend:)
December 03, 2012, at 11:22 PM by 128.187.97.21 -
Changed lines 20-21 from:
[[Attach:simulink_to_workspace.png]]
to:
Attach:simulink_to_workspace.png
Changed lines 24-25 from:
[[Attach:matlab_input_data.png]]
to:
Attach:matlab_input_data.png
Changed line 28 from:
[[Attach:matlab_save_data.png]]
to:
Attach:matlab_save_data.png
December 03, 2012, at 11:22 PM by 128.187.97.21 -
Changed lines 14-16 from:
Other examples of simulated systems are found in:

[[https://www.hedengren.net/research/models.htm |Repository of nonlinear dynamic models
]]
to:
!! Exporting Data from MATLAB / Simulink

You may want to export data from MATLAB or Simulink to combine plots or for further manipulation in another program like Excel. One way is shown below:

Step 1: Drop the "to Workspace" blocks into Simulink and re-run the simulation. The requested variables will be exported to the MATLAB workspace.

[[Attach:simulink_to_workspace.png
]]

Step 2: From the MATLAB command prompt, view the "input" and "output" data that was generated from the Simulink simulation. Type "input" or "output" to inspect the information that is contained in the variable structure.

[[Attach:matlab_input_data.png]]

Step 3: Save the data to a text file. One way is to construct all of the data that will be saved into a data matrix and then export as an ASCII text file (tab delimited). Make sure your current directory allows you to save a file (is not write-restricted) or it will return an error.

[[Attach:matlab_save_data.png]]

December 03, 2012, at 10:57 PM by 128.187.97.21 -
Changed lines 3-21 from:
(:description Process Control and Dynamics Labs in Chemical Engineering at Brigham Young University:)
to:
(:description Process Control and Dynamics Labs in Chemical Engineering at Brigham Young University:)

!! Lab 2: Simulated System

Project #2 is a virtual system that can be numerically simulated. The purpose of this second lab is to apply more advanced topics that integrate the course material but do not have some of the limitations of physical systems.

* [[Attach:LabSim1.pdf | Simulation Lab 1]] | [[Attach:LabSim1b.zip | Supplemental Files]]
* [[Attach:LabSim2.pdf | Simulation Lab 2]] | [[Attach:LabSim2.zip | Supplemental Files]]
* [[Attach:LabSim3.pdf | Simulation Lab 3]] | [[Attach:LabSim3.zip | Supplemental Files]]
* [[Attach:LabSim4.pdf | Simulation Lab 4]] | [[Attach:LabSim4.zip | Supplemental Files]]

Other examples of simulated systems are found in:

[[https://www.hedengren.net/research/models.htm |Repository of nonlinear dynamic models]]

!! Groups for Project #2

Attach:labs_2012b.png

December 03, 2012, at 10:56 PM by 128.187.97.21 -
Added lines 1-3:
(:title ChE 436: Simulation Labs:)
(:keywords nonlinear, model, predictive control, differential, algebraic, modeling language, process control course:)
(:description Process Control and Dynamics Labs in Chemical Engineering at Brigham Young University:)