Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

1.How to create library in simulink.

ANS: To create a library

 Select the file menu in simulink-> New->library.


 Drag blocks from models other libraries into the new libraru
 Save the library’s model file under a new name.

2. What is subsystem and masking.

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.

3.what is enabled subsystem and triggered subsystem.

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.

4.what is sample time.

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

5.maximum sample time used by you in the models.

ANS: Model sample time should be least common multiple(LCM) of the blocks which are used in our

6.Two float variables can be compared?

ANS: yes, we can compare in mat lab. (ie)For example 0.3==04 is possible in mat lab.

but its is not possible in real-time.(i.e.)in generated code.

7.what is model advisory in the simulink ?

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.

SIMULINK: simulink provides an interactive graphical environment for modeling, simulating


and analyzing of dynamic systems. It enables rapid construction of virtual prototypes to explore design
concepts at any level of detail with minimal efforts

STATEFLOW: It is control logic tool used to model reactive systems via state charts and flow
diagrams within simulink model

9. when do u use simulink and SF.

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.

10.what is solver and solver types.

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:

 Explicit fixed-step continuous solver


 Implicit fixed –step continuous solver
 Discrete variable step solver
 Explicit continuous variable step solvers
 Implicit continuous variable – step solver
 Variable order solver

11.what is fixed step and variable step?

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

12.which solver is used for code generation ?

Type-Fixed step

Solver-discrete (no continuous state)


13.Difference between atomic subsystem and normal subsystem .

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.

14.what is inline parameter in simulink ?

Ans: Selecting Inline parameters has the following effects:

 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.

 when inline parameter is checked in configuration parameter(optimization tab),


we cannot change the block parameter while the simulink is running.

15.How do u test a model ?

ANS: A model can tested by using simulink design verifier option .

16.How do u get the matlab workspace variables to SL and SF workspace.

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'

then click 'apply' and 'ok'

17.what is order of execuation in SF chart(event ,condition,without condition).

ANS: (i)event transition

(ii) condition transition

iii) without condition transition


18.what parallel AND and exclusive OR in SF .

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.

19.where do use Parallel AND and when do u use exclusive OR.

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

20.what is temporial logic?

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.

21.what is chage detection?

ANS: It checks whether a chart input, output or local variable has changed value since the last time step.

there are three different types of change detection available.

(i) has changed

(ii) has changed to

(iii)has changed from

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.

nargin-->number of function input argument.

nargout--> number of function output argument.

varagin-->varaiable length input argument list

varargout--> variable length output argument list.

24.what is try catch.

ANS: when the try statement fails, catch statement will handle the error.

25.what zero crossing ?

ANS: Count number of times signal crosses zero in single time step

26.what is algebric loop and how do u slove that ?

ANS: when the input depends on the output of a block, this situation is called algebraic loop.

for example y=x-y; this will come as 2y=x; y=x/2;

27.what is continous system ,discrete system and hybrid system .

28.Get the details about blocks in SL library?

29.what model browsar and model explorer.

ANS: model browser shows ,all the blocks which are contained in masked system or library block.

30.what is simulink callback ?

ANS: A callback is a Mat lab command that is executed when a certain event occurs.

Simulink supports three types of callbacks:

Model callback ,Block callbacks, Port callbacks

31.what is simulink engine.

32.what is target linking compiler(TLC).

33.what is simulink parameter.


34.what is expression and parameter in SF.

35.what SF chart and SF Truth table.

ANS : state flow chart is a graphical object.

Truth table is a non graphical object. Output depends on condition, decision and actions.

36. When u will use the SF chart and SF Truth table.

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.

38.Default Datatype for the variable?

ANS: double

39.what is single precision and double precision.

single precision-32 bits

1-bit--> sign bit

8-bits-->exponent bit

23-bits--> fraction bit

double precision-64 bits


1-bit--> sign bit

11-bits-->exponent bit

52-bits-->fraction bit

40.Are pointers are used in matlab ?

NO

41.Get details about LookUP table ?

42.Over view of configuration parameters and settings in the model.

.................................................ALL THE BEST............................................................

You might also like