Line 11: Line 11:
 
In the previous exercise, you built and tested the functions mentioned in the list below. Today you will integrate these functions with the rest of the simulator library. Make the following changes:
 
In the previous exercise, you built and tested the functions mentioned in the list below. Today you will integrate these functions with the rest of the simulator library. Make the following changes:
 
* dLoad.m - remove the residues corresponding to derivatives of states from other modules.
 
* dLoad.m - remove the residues corresponding to derivatives of states from other modules.
 +
* dNetwork - simply change the name of the function to loadflow.m
  
* dNetwork
+
----
 +
'''STEP 2b'''
 +
For the Load module, create a Jacobian function jLoad.m. The inputs to this function are the same as for dLoad. The outputs are Jx and Jd, which represent the Jacobian of the residues with respect to the state and the state derivative, respectively.
 +
 
 +
The first line of you function file should be:
 +
 
 +
function [Jx,Jd] = jLoad(t,x,d,z,p)
 +
 
 +
'''STEP 2c'''
 +
Add the following finite state automata models to the library folder (please make sure the names are in exact agreement).
 +
* T_sensor
 +
* T_switch
 +
* T_timer
 +
* T_6sup
 +
* C_sensor
 +
* C_switch
 +
* C_timer
 +
* C_6sup

Revision as of 15:47, 26 November 2015

The purpose of this exercise is to

  1. Download library of external functions necessary for your simulator
  2. Modify and add your function
  3. Execute test runs of your simulator

STEP 1 Download the function library: Exercise4.zip.


STEP 2a In the previous exercise, you built and tested the functions mentioned in the list below. Today you will integrate these functions with the rest of the simulator library. Make the following changes:

  • dLoad.m - remove the residues corresponding to derivatives of states from other modules.
  • dNetwork - simply change the name of the function to loadflow.m

STEP 2b For the Load module, create a Jacobian function jLoad.m. The inputs to this function are the same as for dLoad. The outputs are Jx and Jd, which represent the Jacobian of the residues with respect to the state and the state derivative, respectively.

The first line of you function file should be:

function [Jx,Jd] = jLoad(t,x,d,z,p)

STEP 2c Add the following finite state automata models to the library folder (please make sure the names are in exact agreement).

  • T_sensor
  • T_switch
  • T_timer
  • T_6sup
  • C_sensor
  • C_switch
  • C_timer
  • C_6sup