Você está na página 1de 7

Matlab Interview Questions.

1. What is unit delay?


Unit delay blocks holds and delay its input by the sample period as specify.
Unit delay accepts real and complex signal.
2. What is use of Memory block?
Memory block hold and delay its input by one integration time step.
3. What is zero order hold?
Convert an input signal with continuous sample time to an output signal with
a discrete sample time.
4. What is Virtual and Non-Virtual block?
Virtual block play no active role in simulation.
Non-virtual block play active role in simulation.
5. What is algebraic loop?
Algebraic loop in a Simulink model occurs when a signal loop exists with
only direct feed through block within a loop.
When inputs depends on the output of a blocks, this situation is called
algebraic loop
You can’t generate code for a model
The Simulink algebraic loop solver might not be able to solve the algebraic
loop
It might be execute slowly.
6. How to solve algebraic loop?
By adding unit delay block to avoid algebraic loop
In Diagnostic pane, set the algebraic loop parameter as error -> algebraic
loop stop the initialization.
7. What is the differentiate between Bus and Mux?
Bus: If you are using signal like sensor signal, temperature, and pressure
like that we should use bus.
Create a list of signal existing from bus selector block.
Mux: If you want to create vector from scalar we use Mux.
If you want to split vector to scalar we use demux.
Its combine its input into a single vector output. All input must be a same
data type and numeric type.

8. What is zero crossing detection?


This technique is used to improve simulation runtime but it can cause some
simulation to halt before the completion time.
9. What is saturation?
Saturation blocks receive decision coverage. The Simulink verification
software reports decision coverage for the lower and upper limit parameter.
10. What is a subsystem?
It is a virtual subsystem; it is a collection of many blocks into a single
system. It doesn’t affect the simulation.
11. What is an Enable subsystem?
Enable subsystem execute at each simulation step, where the control signal
has positive signal. It gives the output when control signal is greater than
zero. It doesn’t give the output when control signal is less than zero.
12. What is a Triggered subsystem?
It execute each time trigger event occurs. It contains single control input
called trigger input, that determines the subsystem execute.
There are three types of trigger subsystem.
i) Rising trigger: Raises from negative or zero to positive.
ii) Falling trigger: falling from positive or zero to negative.
iii) Either trigger: when the signal is either raising or falling it will
execute.
13. Atomic subsystem?
Atomic subsystem is a non-virtual subsystem. It will affect the simulation.
Copy of subsystem block from Simulink library and paste in a model
window then create a model inside the subsystem block is called atomic
subsystem.
14. Functions call subsystem?
It represents subsystem that can be invoked as function by another block.
15. Types of Switches?
Switch: Output between 1st input and 3rd input based on the value of 2nd
input.
Manual switch: It is a toggle switch that selects one of its two input passes
through the output.
Multiport switch: The fist input is a control input based on that select
several input.
N-Sample switch: Switch between two inputs after specified number of
sample period.
16. Difference between Gain and Product block?
Gain: Multiply the input by a constant value input can be scalar vector and
matrices.
Product: Multiply and divide scalar and non-scalar or multiply and invert
matrices.
17. What is try catch?
Try and catch both are handle error. When the try statement fails, catch
statement will handle the error.
18. What are S-Functions?
The S-Function blocks allow additional parameter to be passed directly to
the named s-function. The function parameter can be specified as Matlab
expression or as variable separated by commas.
19. What is sample time?
Sample time of a block is a parameter that indicates when during
simulation, the block produces output and its update its internal state.
Block based: all of the input and output of the block run at same time.
Port based: all of the input and output of the block run at different time.
20. What is Solver?
A Solver is a component of Simulink software, which determine the time of
the next simulation step and to solve the set of ordinary differential equation
that represent model.
21. What is Inline Parameter?
In optimization tab when inline parameter is checked we cannot change the
block parameter while the simulation is running.
22. What is set_param?
A set of multiple parameters on the same model or block use a single
set_param command with multiple pair of arguments.
23. What is Merge block?
It is used to combine multiple signals into single signal.
Input port offset is set as [0 2].

24. What is Scaling?


The dynamic range of fixed-point number is much less than a floating point
number with equivalent word sizes. To avoid overflow condition and
minimize quantization error, fixed point number must be scaled.

25. Difference between Simulink and State flow?


Simulink is a dynamic system. It is used to design physical model.
State flow is a even driven system also called as reactive system.

26. When do you use Simulink and State flow?


Simulink is used to design continuous change in dynamic system.
State flow is used to design instantaneous change in dynamic system.

State flow
1. What is action?
Action can execute transition from one state to another state, depending
on the activity status of state.

2. What is API?
API is the application programming interface, it communicate with an
application program from a script environment.

3. What is Atomic sub chart?


Graphical object that enable to reuse state and sub chart multiple time in
a chart.

4. What is BOX?
Graphical object that group together with other graphical object in a
chart.

5. What is Condition?
When the specified Boolean expression is true if the transition will
occurs.

6. What is connective junction?


Connective junction is a decision point in the system. It is representation
of different possible transition path for a single transition.

7. What is Decomposition?
When it consist of one or more substate. A chart that contains at least
one state also has decomposition.
Parallel AND: when state have dashed border. All the state is active at
same time.
Exclusive OR: when state have solid border only one state active at a
time.

8. What is Default transition?


When entering the level, which object becomes active by default. A
default transition has a destination but no source object.

9. What is Event?
Event that causes the transition to be taken provided condition is true.
Multiple events are specified using OR logical operator.

10. What is a Finite state machine?


It is a representation of an even driven system, the transition start from
one state to another state if condition is true.

11. What is Flow graph?


Set of decision flow path that start for transition segment that start from
a state or default transition segment.

12. What is a Flow path?


Sequence of transition segment and junction where each segment starts
on the junction and terminate the previous segment.

13. What is graphical function?


A chart function whose logic is defined by a flow graph.

14. What is a history junction?


History junction represents decision point in state flow chart. The
transition to the destination substates that was most recently active.

15. What is inner transition?


Transition does not exist the source state it is used in exclusive-or
decomposition.

16. What is Mealy machine?


Industry standard for finite state machine where output is a function of
both input and state.

17. What is Moore machine?


Where output is a function of only one state is called Moore machine.

18. What is notation?


A set of graphical object, a set of non-graphical text based object is
called notation.

19. What is parallelism?


Two or more state active at a same time is called parallelism.

20. What is an S-Function?


To generate an S-Function(Mex-file) for each stateflow machine. This
will generate code in a simulation target.

21. What is State?


A state describes a mode of reactive system. The active or inactive to its
level of chart state can execute in sequence of active.

22. What is super Transition?


Transition between object in different subchart is called super transition.
23. What is super state?
A state is a super state if it contains other state.

24. What is transition?


The system moves from one state to another state is called transition.

25. What is super semantics?


Stateflow chat execute once for each active input event.
Entry: execute when the state becomes active.
During: execute when the state is active and a specific event occurs.
Exit: execute when the state is active and a transition out of the state
occurs.
Bind: bind is an event or object so that only that state and its children
state can broadcast event or change the data value.
26. What is Temporal Logic?
It controls execution of a stateflow in term of time.
After: syntax after(n,tick) . In a chart with number of input event return
true if the chart has wake up n time.
Before: in a chart with number of input event return true if the chart
wake up fewer than n times.
At: in a chart with number of input in a chart wake up nth time.
Every: every nth time chat will wake up.

Você também pode gostar