Action Port If case[l]is true, Action subsystem A is called. This implies that the default condition is false. When b is later called for the default condition its states are reset. In the same way, Action subsystem a's states are reset when it is called right after Action subsystem B is called. Repeated calls to a case's Action subsystem do not reset its states. If a is called again right after a previous call to a, this does not reset as states because its condition, case[l], was not previously false. The same applies to B Characteristics Sample Time Inherited from driving If or Switch Case block 2-7
Action Port 2-7 If case[1] is true, Action subsystem A is called. This implies that the default condition is false. When B is later called for the default condition, its states are reset. In the same way, Action subsystem A’s states are reset when it is called right after Action subsystem B is called. Repeated calls to a case’s Action subsystem do not reset its states. If A is called again right after a previous call to A, this does not reset A’s states because its condition, case[1], was not previously false. The same applies to B. Characteristics Sample Time Inherited from driving If or Switch Case block. slref.book Page 7 Friday, June 21, 2002 5:58 PM
Algebraic Constraint Constrain the input signal to zero Library Math Operations Description The Algebraic Constraint block constrains the input signal fz) to zero and outputs an algebraic state z. The block outputs the value necessary to produce a zero at the input. The output must affect the input through some feedback path. This enables you to specify algebraic equations for index 1 differential/ algebraic systems(daes). By default, the Initial guess parameter is zero. You can improve the efficiency of the algebraic loop solver by providing an Initial guess for the algebraic state z that is close to the solution value For example, the following model solves these equations z2+z1=1 The solution is z2=1, z1=0, as the display blocks show 匚可 Deploy z2 Data Type An Algebraic Constraint block accepts and outputs real values of type double 2-8
Algebraic Constraint 2-8 2Algebraic Constraint Purpose Constrain the input signal to zero Library Math Operations Description The Algebraic Constraint block constrains the input signal f(z) to zero and outputs an algebraic state z. The block outputs the value necessary to produce a zero at the input. The output must affect the input through some feedback path. This enables you to specify algebraic equations for index 1 differential/ algebraic systems (DAEs). By default, the Initial guess parameter is zero. You can improve the efficiency of the algebraic loop solver by providing an Initial guess for the algebraic state z that is close to the solution value. For example, the following model solves these equations. z2 + z1 = 1 z2 – z1 = 1 The solution is z2 = 1, z1 = 0, as the Display blocks show. Data Type Support An Algebraic Constraint block accepts and outputs real values of type double. slref.book Page 8 Friday, June 21, 2002 5:58 PM
Algebraic Constraint Parameters and Dialog Box Constan rpu in a faz o r and culpus n algebrac tate z The hput must affect the nput through some feedback path. Provide an initial we algebrac loop adver efficiency 0Kcme地」_幽」 Initial guess An initial guess for the solution value. The default is o haracteristics Direct Feedthrough Yes Sample time Inherited from driving block Scalar Expansion Zero Crossing 2-9
Algebraic Constraint 2-9 Parameters and Dialog Box Initial guess An initial guess for the solution value. The default is 0. Characteristics Direct Feedthrough Yes Sample Time Inherited from driving block Scalar Expansion No Dimensionalized Yes Zero Crossing No slref.book Page 9 Friday, June 21, 2002 5:58 PM
Assertion Check whether a signal is nonzero Library Model verification Description The Assertion block checks whether any of the elements of the signal at its input is nonzero. If any element is nonzero, the block does nothing. If any element is zero, the block halts the simulation, by default, and displays an error message. The block's parameter dialog box allows you to specify that the block should display an error message when the assertion fails but allow the simulation to continue specify an M-expression to be evaluated when the assertion fails enable or disable the assertion You can also use the Advanced Pane of the Simulation Parameters dialog box to enable or disable all assertion blocks in a model The Assertion block and its companion blocks in the Model verification library are intended to facilitate creation of self-validating models. For example, you can use model verification blocks to test that signals do not exceed specified limits during simulation. When you are satisfied that a model is correct, you can turn error-checking off by disabling the verification blocks. You do not have to physically remove them from the model. If you need to modify a model, you can temporarily turn the verification blocks back on to ensure that your changes do not break the model Data Type The Assertion block accepts input signals of any dimensions and any data type ort including fixed-point data types, except int64 and uint64 Parameters and Dialog BOxAs过 non-zero The defaut be的 ence of a calbock is to output an etot me v Enable assertion Simulation callback when assertion fai 0Kch」_A
Assertion 2-10 2Assertion Purpose Check whether a signal is nonzero Library Model Verification Description The Assertion block checks whether any of the elements of the signal at its input is nonzero. If any element is nonzero, the block does nothing. If any element is zero, the block halts the simulation, by default, and displays an error message. The block’s parameter dialog box allows you to • specify that the block should display an error message when the assertion fails but allow the simulation to continue. • specify an M-expression to be evaluated when the assertion fails • enable or disable the assertion You can also use the Advanced Pane of the Simulation Parameters dialog box to enable or disable all Assertion blocks in a model. The Assertion block and its companion blocks in the Model Verification library are intended to facilitate creation of self-validating models. For example, you can use model verification blocks to test that signals do not exceed specified limits during simulation. When you are satisfied that a model is correct, you can turn error-checking off by disabling the verification blocks. You do not have to physically remove them from the model. If you need to modify a model, you can temporarily turn the verification blocks back on to ensure that your changes do not break the model. Data Type Support The Assertion block accepts input signals of any dimensions and any data type, including fixed-point data types, except int64 and uint64. Parameters and Dialog Box slref.book Page 10 Friday, June 21, 2002 5:58 PM
Assertion Unchecking this option disables the Assertion block, that is, causes the model to behave as if the Assertion block did not exist The Advanced Pane of the Simulation Parameters dialog box allows you to enable or disable Simulation callback when assertion fails fails top simulation when assertion fails If checked, this option causes the Assertion block to halt the simulation when the block's input is zero and display an error message in Simulinks Simulation Diagnostics viewer. Otherwise, the block displays a warning message in the MatlAB command window and continues the simulation Characteristics Direct Feedthrough No Inherited from driving block Scalar Expansio Zero crossing
Assertion 2-11 Enable Assertion Unchecking this option disables the Assertion block, that is, causes the model to behave as if the Assertion block did not exist. The Advanced Pane of the Simulation Parameters dialog box allows you to enable or disable all Assertion blocks in a model regardless of the setting of this option. Simulation callback when assertion fails An M-expression to be evaluated when the assertion fails. Stop simulation when assertion fails If checked, this option causes the Assertion block to halt the simulation when the block’s input is zero and display an error message in Simulink’s Simulation Diagnostics viewer. Otherwise, the block displays a warning message in the MATLAB command window and continues the simulation. Characteristics Direct Feedthrough No Sample Time Inherited from driving block Scalar Expansion No Dimensionalized Yes Zero Crossing No slref.book Page 11 Friday, June 21, 2002 5:58 PM