Professional Documents
Culture Documents
Matquestions
Matquestions
Ans: A subsystem is a set of blocks that have been replaced by a single block called subsystem block.
As your model increases in size and complexity, you can simplify it by grouping blocks into subsystems.
A mask is a custom uses interface for subsystem that hides the contents of subsystem, making it
appear to the user as an atomic block with its own icon and parameter dialog box .It prevents unintended
modification of subsystems by hiding their contents behind a mask.
ENABLED SUBSYSTEM: It is a subsystem that executes at each simulation step where the
control signal has a positive value. It has a single control input, which can be scalar or vector valued .
TRIGGERED SUBSYSTEM: triggered subsystem that execute each time a trigger event occurs
.It has single control input called trigger input that determines whether the subsystem executes.
ANS : The sample time of a block is a parameter that indicates when during the simulation the block
produces outputs and if appropriate and updates its internal state. The internal state includes but is not
limited to continuous and discrete states that are logged. It is used to control the rate of block execution
ANS: Model sample time should be least common multiple(LCM) of the blocks which are used in our
ANS: yes, we can compare in mat lab. (ie)For example 0.3==04 is possible in mat lab.
ANS: The model advisory checks a model or subsystem for condition and configuration settings that can
result in inaccurate or inefficient simulation of the system that the model represents.
8.what is the difference between state flow and simulink.
STATEFLOW: It is control logic tool used to model reactive systems via state charts and flow
diagrams within simulink model
Simulink is mainly used as graphical block diagramming tool and customized set of block
libraries .simulink is widely used in control theory and dsp for multidomain simulation and model based
design simulink is used to design continuous changes in dynamic system.
stateflow is used to design instantaneous changes in dynamic system.Stateflow can be used in embedded
systems, man-machine interface , hybrid systems.
Solver Is A Component Of The Simulink, Which determine the time of the next simulation step and
applies a numerical method to solve the set of ordinary differential equations that represent the model
Solver types:
The fixed step discrete solver computes the time of the next simulation step by adding a fixed
step size to the current time.
The variable step solvers in the simulink product dynamically vary the step size during the
simulation
Type-Fixed step
Ans: An Atomic Subsystem block is a Subsystem block where Treat as atomic unit is selected by
default. we can create conditionally executed nonvirtual subsystems that are executed only when a
transition occurs on a triggering, function-call, action, or enabling input Atomic subsystem is a non-
virtual subsytem. it will affect the simulation. it is represented by bold line.
Normal subsystem is a virtual subsystem. it will not affect the simulation. it is represented by thin line.
Real-Time Workshop software uses the numerical values of model parameters, instead of their
symbolic names, in generated code.
Reduces global RAM usage, because parameters are not declared in the global parameters
structure.
Enables the Configure button. Clicking the Configure button opens the Model Parameter
Configuration dialog box.
select configuration Parameter-->Data/import(tab)-->under load from workspace, check 'input' and type
your variable name.
select 'initial value' tab in Stateflow model explorer,in that select 'parameter' instead of 'expression'
Exclusive (OR) states describe modes that are mutually exclusive. A chart or state that contains exclusive
(OR) states has exclusive decomposition
A chart or state with parallel states has two or more states that can be active at the same time. parallel
(AND) states has parallel decomposition.
ANS: If all the states has to active at all times then parallel AND is used.
If anyone of the state has to active at a particular time then exclusive OR is used
ANS: Stateflow temporal logic operators (such as after, at, before, or every) are Boolean
operators that operate on recurrence counts of Stateflow events. Temporal logic operators can
appear only in conditions on transitions that from states, and in state actions.Temporal logic
operators is used where a counter is required.
ANS: It checks whether a chart input, output or local variable has changed value since the last time step.
22.what is "after","tick"?
ANS: For a chart with no input events, we can use the “tick” or wakeup event to denote the implicit
event of a chart waking up.
← after (n,e) is event based temporal logic in transitions where “e” is event due to which transition
occurs and “n” is the no. of integers to represent time.Returns true for a transition to occur if the
base event ‘e’ has occurred at least ‘n’ times since activation of the associated state. Otherwise,
the operator returns false (i.e) no transition occurs.
23.what is nargin ,nargout,varargin,varargout.
ANS: when the try statement fails, catch statement will handle the error.
ANS: Count number of times signal crosses zero in single time step
ANS: when the input depends on the output of a block, this situation is called algebraic loop.
ANS: model browser shows ,all the blocks which are contained in masked system or library block.
ANS: A callback is a Mat lab command that is executed when a certain event occurs.
Truth table is a non graphical object. Output depends on condition, decision and actions.
SF chart is used where ever the graphical representation is needed for the event driven system . we can
use State flow charts to control a physical plant in response to events such as a temperature or pressure
sensor, or clock or user-driven events.
SF truth table is used where the logical true or false result is enough . The Truth Table block is an
Embedded MATLAB truth table function that you can add to a Simulink model directly. When we add a
Truth Table block directly to a model instead of calling truth table functions from a Stateflow chart, these
advantages apply:
It is a more direct approach, especially if our model requires only a single truth table.
We can define truth table inputs and outputs to have inherited types and sizes.
The Truth Table block supports the Embedded MATLAB language subset for programming conditions
and actions, and generates content as Embedded MATLAB code. Embedded MATLAB functions work
with a subset of the MATLAB language that is optimized for generating embeddable C code.
37.what is Setpath ?
We can add new directories to the path either by using the addpath function, or by selecting File >
SetPath to edit the path.
ANS: double
8-bits-->exponent bit
11-bits-->exponent bit
52-bits-->fraction bit
NO