Search
CARRIER
How To Become Professional Engineer? For more info visit
PROJECT
ELECTRIC SHOCK
CLICK MY ADS
SAFETY
LIGHTNING THEORY
- Sep 10 (1)
- Sep 11 (3)
- Sep 14 (2)
- Sep 15 (1)
- Sep 16 (2)
- Sep 17 (1)
- Sep 28 (1)
- Oct 01 (1)
- Oct 02 (1)
- Oct 16 (1)
- Oct 17 (1)
- Oct 31 (1)
- Nov 09 (3)
- Feb 07 (3)
- Feb 08 (3)
- Feb 09 (3)
- Feb 10 (1)
- Feb 11 (1)
- Feb 12 (1)
- Feb 13 (3)
- Feb 14 (1)
- Feb 15 (4)
- Feb 16 (1)
- Feb 17 (2)
- Feb 20 (2)
- Feb 21 (1)
- Feb 22 (1)
- Feb 23 (2)
- Feb 24 (1)
- Feb 26 (1)
- Feb 27 (1)
- Mar 01 (2)
- Mar 02 (1)
- Mar 12 (2)
MY ADS
INFO
In January 2008. Tenaga Nasional Berhad (TNB) have been decides to change their supply to consumer in order to prevent equipment from damage.
For Three Phase voltage supply: 415V change to 400V.
For One 1 Phase Voltage supply: 240V change to 230V.
Blog Archive
ELECTRIC BILL
Fluorescent lights
1 sen
Wireless Router
1 sen
ASTRO decoder + dish
2 sen
Table Fan
2 sen
Incandescent lights
3 sen
Ceiling Fan
3 sen
Computer (laptop)
5 sen
CRT (‘normal’) TV (21 inch)
3 sen
LCD TV (32 inch)
7 sen
Computer (desktop)
9 sen
Plasma TV (42 inch)
10 sen
Washing Machine
15 sen
Vaccuum Cleaner
17 sen
Electrical Clothes Iron
33 sen
Electric Hot Plate
46 sen
Air Conditioning
46 sen
Electric Water Kettle
50 sen
LETS TALK
figure below shows the scope blocks
- Scope, Floating Scope, Signal Viewer Scope
Display signals generated during a simulation
- Library
- Description
The Scope block displays its input with respect to simulation time. The Scope block can have multiple axes (one per port); all axes have a common time range with independent y-axes. The Scope allows you to adjust the amount of time and the range of input values displayed. You can move and resize the Scope window and you can modify the Scope's parameter values during the simulation.
When you start a simulation, Simulink does not open Scope windows, although it does write data to connected Scopes. As a result, if you open a Scope after a simulation, the Scope's input signal or signals will be displayed.
If the signal is continuous, the Scope produces a point-to-point plot. If the signal is discrete, the Scope produces a stair-step plot.
The Scope provides toolbar buttons that enable you to zoom in on displayed data, display all the data input to the Scope, preserve axis settings from one simulation to the next, limit data displayed, and save data to the workspace. The toolbar buttons are labeled in this figure, which shows the Scope window as it appears when you open a Scope block.
Note: Do not use Scope blocks inside library blocks that you create. Instead, provide the library blocks with output ports to which scopes can be connected to display internal data.
- Displaying Vector Signals
When displaying a vector or matrix signal, the Scope assigns colors to each signal element in this order: yellow, magenta, cyan, red, green, and dark blue. When more than six signals are displayed, the Scope cycles through the colors in the order listed.
- Y-Axis Limits
You set y-limits by right-clicking an axis and choosing Axes Properties. The following dialog box appears.
- Y-max
Enter the maximum value for the y-axis.
- Title
Enter the title of the plot. You can include a signal label in the title by typing % as part of the title string (% is replaced by the signal label).
- Time Offset
This figure shows the Scope block displaying the output of the vdp model. The simulation was run for 40 seconds. Note that this scope shows the final 20 seconds of the simulation. The Time offset field displays the time corresponding to 0 on the horizontal axis. Thus, you have to add the offset to the fixed time range values on the x-axis to get the actual time.
- Autoscaling the Scope Axes
This figure shows the same output after you click the Autoscale toolbar button, which automatically scales both axes to display all stored simulation data. In this case, the y-axis was not scaled because it was already set to the appropriate limits.
If you click the Autoscale button while the simulation is running, the axes are autoscaled based on the data displayed on the current screen, and the autoscale limits are saved as the defaults. This enables you to use the same limits for another simulation.
Note:Simulink does not buffer the data that it displays on a floating Scope. It can therefore scale the contents of a floating Scope only when data is being displayed, i.e., when a simulation is running. When a simulation is not running, Simulink disables (grays) the Zoom button on the toolbar of a floating Scope to indicate that it cannot scale its contents.
- Zooming
You can zoom in on data in both the x and y directions at the same time, or in either direction separately. The zoom feature is not active while the simulation is running.
To zoom in on data in both directions at the same time, make sure you select the leftmost Zoom toolbar button. Then, define the zoom region using a bounding box. When you release the mouse button, the Scope displays the data in that area. You can also click a point in the area you want to zoom in on.
If the scope has multiple y-axes, and you zoom in on one set of x-y axes, the x-limits on all sets of x-y axes are changed so that they match, because all x-y axes must share the same time base (x-axis).
This figure shows a region of the displayed data enclosed within a bounding box.
This figure shows the zoomed region, which appears after you release the mouse button.
To zoom in on data in just the x direction, click the middle Zoom toolbar button. Define the zoom region by positioning the pointer at one end of the region, pressing and holding down the mouse button, then moving the pointer to the other end of the region. This figure shows the Scope after you define the zoom region, but before you release the mouse button.
When you release the mouse button, the Scope displays the magnified region. You can also click a point in the area you want to zoom in on.
Zooming in the y direction works the same way except that you click the rightmost Zoom toolbar button before defining the zoom region. Again, you can also click a point in the area you want to zoom in on.
Note: Simulink does not buffer the data that it displays on a floating scope. It therefore cannot zoom the contents of a floating scope. To indicate this, Simulink disables (grays) the Zoom button on the toolbar of a floating scope.
- Saving the Axes Settings
The Save axes settings toolbar button enables you to store the current x- and y-axis settings so you can apply them to the next simulation.
You might want to do this after zooming in on a region of the displayed data so you can see the same region in another simulation. The time range is inferred from the current x-axis limits.
- Scope Parameters
The Scope Parameters dialog box lets you change axis limits, set the number of axes, time range, tick labels, sampling parameters, and saving options. To display the dialog, select the Parameters button on the toolbar of the Scope block's display.
or by double-clicking on the Scope viewer's display. The appearance of the dialog box depends on whether the scope is a Scope block or a Scope viewer created by the Signal and Scope Manager. If the scope is a Scope block, this dialog appears.
The dialog box has two panes: General and Data history. See the next topic for information on the General parameters pane. See Data History Parameters Pane for information on the Data History parameters pane.
If the scope is a Scope viewer, this dialog box appears.
- General Parameters Pane
You can set the axis parameters, time range, and tick labels in the General pane.
- Number of axes
Set the number of y-axes in this data field. With the exception of the floating scope, there is no limit to the number of axes the Scope block can contain. All axes share the same time base (x-axis), but have independent y-axes. Note that the number of axes is equal to the number of input ports.
- Time range
Change the x-axis limits by entering a number or auto in the Time range field. Entering a number of seconds causes each screen to display the amount of data that corresponds to that number of seconds. Enter auto to set the x-axis to the duration of the simulation. Do not enter variable names in these fields.
- Tick labels
Specifies whether to label axes tics. The options are:
- all
- Label tics on the outside of all axes
- inside
- Place tic labels inside all axes (available only on scope viewers)
- bottom-axis only
- Place tic labels outside the bottom (or only) axes
- none
Do not label tics (available only on Scope blocks)
Note The next three options appear only for the dialog box for a Scope viewer
- Scroll
When this option is selected, the scope continuously scrolls the displayed signals to the left so as to keep as much of them in view as will fit on the screen at any one time. When this option is not selected, the scope draws a screenful of data from left to right until the screen is full, erases the screen and draws the next screenful of data, and so on, until the end of simulation time. Note that the effects of this option are discernible only when drawing is slow, for example, when the model is very large or has a very small step size.
- Data Markers
Displays a marker at each data point on the scope viewer screen
- Legends
Displays a legend on the scope that indicates the line style used to display each signal
- Floating scope
This option appears only on the General parameters pane for the Scope block.
Selecting this option turns a Scope block into a floating scope. A floating scope is a Scope block that can display the signals carried on one or more lines. You can create a Floating Scope block in a model either by copying a Scope block from the Simulink Sinks library into a model and selecting this option or, more simply, by copying the Floating Scope block from the Sinks library into the model window. The Floating Scope block has the Floating scope parameter selected by default.
To use a floating scope during a simulation, first open the scope. To display the signals carried on a line, select the line. Hold down the Shift key while clicking another line to select multiple lines. It might be necessary to click the Autoscale data button on the floating scope's toolbar to find the signal and adjust the axes to the signal values. Or you can use the floating scope's Signal Selector (see The Signal Selector in the online Simulink documentation) to select signals for display. To display a floating scope's Signal Selector, first start the simulation of your model with the floating scope open. Then right-click your mouse in the floating scope and select Signal Selection from the pop-up menu that appears.
You can have more than one floating scope in a model, but only one set of axes in one scope can be active at a given time. Active floating scopes show the active axes by making them blue. Selecting or deselecting lines affects the active floating scope only. Other floating scopes continue to display the signals that you selected when they were active. In other words, inactive floating scopes are locked, in that their signal displays cannot change.
To specify display of a signal on one of the axes of a multiaxis floating scope, click the axis. Simulink draws a blue border around the axis.
Then click the signal you want to display in the block diagram or the Signal Selector. When you run the model, the selected signal appears in the selected axis.
If you plan to use a floating scope during a simulation, you should disable signal storage reuse. See "Signal storage reuse" in "The Optimization Pane" for more information.
Sampling
To specify a decimation factor, enter a number in the data field to the right of the Decimation choice. To display data at a sampling interval, select the Sample time choice and enter a number in the data field.
- Data History Parameters Pane
The Data History parameters pane appears only on the Parameters dialog box for the Scope block. The pane appears as follows:
This pane lets you control the amount of data that the Scope stores and displays. You can also choose to save data to the workspace in this pane. You apply the current parameters and options by clicking the Apply or OK button. The values that appear in these fields are the values that are used in the next simulation.
- Limit data points to last
You can limit the number of data points saved to the workspace by selecting the Limit data points to last check box and entering a value in its data field. The Scope relies on its data history for zooming and autoscaling operations. If the number of data points is limited to 1,000 and the simulation generates 2,000 data points, only the last 1,000 are available for regenerating the display.
- Save data to workspace
You can automatically save the data collected by the Scope at the end of the simulation by selecting the Save data to workspace check box. If you select this option, the Variable name and Format fields become active.
- Variable name
Enter a variable name in the Variable name field. The specified name must be unique among all data logging variables being used in the model. Other data logging variables are defined on other Scope blocks, To Workspace blocks, and simulation return variables such as time, states, and outputs. Being able to save Scope data to the workspace means that it is not necessary to send the same data stream to both a Scope block and a To Workspace block.
- Format
Data can be saved in one of three formats: Array, Structure, or Structure with time. Use Array only for a Scope with one set of axes. For Scopes with more than one set of axes, use Structure if you do not want to store time data and use Structure with time if you want to store time data.
Performance Parameters Pane
The Performance parameters pane appears only on the Parameters dialog box for the Scope viewer. The pane appears as follows.
This pane lets you control how frequently Simulink refreshes the Scope viewer. Reducing the refresh rate can speed up the simulation in some cases. The pane contains the following controls.
- Refresh Period
This list control lets you select the units in which the refresh period is expressed. Options are either seconds or frames where a frame is the width of the scope's screen in seconds, i.e., it equals the value of the scope's Time range parameter.
- Refresh Slider
Drag the slider button to the right to increase the refresh period and hence decrease the refresh rate.
- Freeze Button
Click the button to freeze (stop refreshing) or unfreeze the Scope viewer.
- History Pane
The History parameters pane appears only on the Parameters dialog box for the Scope viewer.
This pane lets you control the amount of data that the Scope viewer stores and displays. You can also choose to save data to the workspace in this pane. You apply the current parameters and options by clicking the Apply or OK button. The values that appear in these fields are the values that are used in the next simulation.
- Limit data points to last
You can limit the number of data points saved to the workspace by selecting the Limit data points to last check box and entering a value in its data field. The Scope relies on its data history for zooming and autoscaling operations. If the number of data points is limited to 1,000 and the simulation generates 2,000 data points, only the last 1,000 are available for regenerating the display.
- Save data to workspace
Check this option to save data displayed on the scope viewer at the end of the simulation. Simulink saves the data in the Simulink.ModelDataLogs object used to log data for the model (see Logging Signals for more information). For this option to take effect, you must also enable signal logging for the model as a whole, i.e., you must check the Signal logging option on the Data Import/Export pane of the model's Configuration Parameters dialog box.
Variable name
Specifies the name under which to store the viewer's data in the model's Simulink.ModelDataLogs object. The name must be different from the log names specified by other signal viewers or for other signals, subsystems, or model references logged in the model's Simulink.ModelDataLogs object.
- Printing the Contents of a Scope Window
To print the contents of a Scope window, open the Print dialog box by clicking the Print icon, the leftmost icon on the Scope toolbar
- Data Type Support
The Scope block accepts real signals of any data type supported by Simulink, including fixed-point data types. The Scope block accepts homogeneous vectors.
For a discussion on the data types supported by Simulink, see Data Types Supported by Simulink in the Simulink documentation.
Characteristics
Thank you
Figure below shows To Workspace Blocks
- To Workspace
Write data to the workspace
- Library
Sinks
- Description
The To Workspace block writes its input to the workspace. The block writes its output to an array or structure that has the name specified by the block's Variable name parameter. The Save format parameter determines the output format.
- Array
Selecting this option causes the To Workspace block to save the input as an N-dimensional array where N is one more than the number of dimensions of the input signal. For example, if the input signal is a 1-D array (i.e., a vector), the resulting workspace array is two-dimensional. If the input signal is a 2-D array (i.e., a matrix), the array is three-dimensional.
The way samples are stored in the array depends on whether the input signal is a scalar or vector or a matrix. If the input is a scalar or a vector, each input sample is output as a row of the array. For example, suppose that the name of the output array is simout. Then, simout(1,:) corresponds to the first sample, simout(2,:) corresponds to the second sample, etc. If the input signal is a matrix, the third dimension of the workspace array corresponds to the values of the input signal at specified sampling point. For example, suppose again that simout is the name of the resulting workspace array. Then, simout(:,:,1) is the value of the input signal at the first sample point; simout(:,:,2) is the value of the input signal at the second sample point; etc.
The amount of data written and the time steps at which the data is written are determined by block parameters:
- The Limit data points to last parameter indicates how many sample points to save. If the simulation generates more data points than the specified maximum, the simulation saves only the most recently generated samples. To capture all the data, set this value to inf.
- The Decimation parameter allows you to write data at every nth sample, where n is the decimation factor. The default decimation, 1, writes data at every time step.
The Sample time parameter allows you to specify a sampling interval at which to collect points. This parameter is useful when you are using a variable-step solver where the interval between time steps might not be the same. The default value of -1 causes the block to inherit the sample time from the driving block when determining the points to write. See "Specifying Sample Time" in the online documentation for more information.
During the simulation, the block writes data to an internal buffer. When the simulation is completed or paused, that data is written to the workspace. Its icon shows the name of the array to which the data is written.
- Structure
This format consists of a structure with three fields: time, signals, and blockName. The time field is empty. The blockName field contains the name of the To Workspace block. The signals field contains a structure with three fields: values, dimensions, and label. The values field contains the array of signal values. The dimensions field specifies the dimensions of the values array. The label field contains the label of the input line.
- Structure with Time
This format is the same as Structure except that the time field contains a vector of simulation time steps.
- Using Saved Data with a From Workspace Block
If the data written using a To Workspace block is intended to be played back in another simulation using a From Workspace block, use the Structure with Time format to save the data.
Examples
In a simulation where the start time is 0, the Limit data points to last is 100, the Decimation is 1, and the Sample time is 0.5. The To Workspace block collects a maximum of 100 points, at time values of 0, 0.5, 1.0, 1.5, ..., seconds. Specifying a Decimation value of 1 directs the block to write data at each step.
In a similar example, the Limit data points to last is 100 and the Sample time is 0.5, but the Decimation is 5. In this example, the block collects up to 100 points, at time values of 0, 2.5, 5.0, 7.5, ..., seconds. Specifying a Decimation value of 5 directs the block to write data at every fifth sample. The sample time ensures that data is written at these points.
In another example, all parameters are as defined in the first example except that the Limit data points to last is 3. In this case, only the last three sample points collected are written to the workspace. If the simulation stop time is 100, data corresponds to times 99.0, 99.5, and 100.0 seconds (three points)
- Data Type Support
The To Workspace block can save real or complex inputs of any data type supported by Simulink, including fixed-point data types, to the MATLAB workspace.
- Parameters and Dialog Box
- Variable name
The name of the array that holds the data.
- Limit data points to last
The maximum number of input samples to be saved. The default is inf samples.
- Decimation
A decimation factor. The default is 1.
- Sample time
The sample time at which to collect points. See "Specifying Sample Time" in the online documentation for more information.
- Save format
Format in which to save simulation output to the workspace. The default is structure.
- Log fixed-point data as a fi object
Select to log fixed-point data to the MATLAB workspace as a Simulink Fixed-Point fi object. Otherwise, fixed-point data is logged to the workspace as double.
Characteristics
Thank You..
Figure below show the Mux block
- Mux
Combine several input signals into a vector
- Library
Signal Routing
- Description
The Mux block combines its inputs into a single vector output. An input can be a scalar or vector signal. All inputs should be of the same data type and numeric type.
Note: The Mux block allows you to connect signals of differing data and numeric types and matrix signals to its inputs. In this case, the Mux block outputs a bus signal combining the inputs. In other words, the Mux block behaves like a Bus Creator block. Nevertheless, you should use Bus Creator blocks in such cases to ensure that your model will run in future releases of Simulink, which may not support the use of Mux blocks as Bus Creators. If your model currently uses Mux blocks as Bus Creators, you may want to consider replacing the Mux blocks with equivalent Bus Creator blocks (see Mux blocks used to create bus signals for more information).
The Mux block's Number of Inputs parameter allows you to specify input signal names and sizes as well as the number of inputs. You can use any of the following formats to specify this parameter:
- Scalar
Specifies the number of inputs to the Mux block. When this format is used, the block accepts scalar or vector signals of any size. Simulink assigns each input the name signalN, where N is the input port number.
- Vector
The length of the vector specifies the number of inputs. Each element specifies the size of the corresponding input. A positive value specifies that the corresponding port can accept only vectors of that size. For example, [2 3] specifies two input ports of sizes 2 and 3, respectively. If an input signal width does not match the expected width, Simulink displays an error message. A value of -1 specifies that the corresponding port can accept scalars or vectors of any size.
- Cell array
The length of the cell array specifies the number of inputs. The value of each cell specifies the size of the corresponding input. A scalar value N specifies a vector of size N. A value of -1 means that the corresponding port can accept scalar or vector signals of any size.
- Signal name list
You can enter a list of signal names separated by commas. Simulink assigns each name to the corresponding port and signal. For example, if you enter position,velocity, the Mux block will have two inputs, named position and velocity.
Note:
- Data Type Support
The Mux block accepts real or complex signals of any data type supported by Simulink, including fixed-point data types.
For a discussion on the data types supported by Simulink, see Data Types Supported by Simulink in the Simulink documentation.
- Number of inputs
The number and size of inputs. You can enter a comma-separated list of signal names for this parameter field.
- Display option
The appearance of the block in the model.
Thank You..
Figure below shows the clock block
- Clock
Display and provide the simulation time
- Library
Sources
- Description
The Clock block outputs the current simulation time at each simulation step. This block is useful for other blocks that need the simulation time. When you need the current time within a discrete system, use the Digital Clock block.
- Data Type Support
The Clock block outputs a real-valued signal of type double.
- Parameters and Dialog Box
- Display time
Use the Display time check box to display the current simulation time inside the Clock icon.
- Decimation
The Decimation parameter value is the increment at which the clock is updated; it can be any positive integer. For example, if the decimation is 1000, then, for a fixed integration step of 1 millisecond, the clock updates at 1 second, 2 seconds, and so on
Characteristics
Thank You..
Figure Below Shows the Step block
- Step
Generate a step function
- Library
Sources
- Description
The Step block provides a step between two definable levels at a specified time. If the simulation time is less than the Step time parameter value, the block's output is the Initial value parameter value. For simulation time greater than or equal to the Step time, the output is the Final value parameter value.
The block's numeric parameters must be of the same dimensions after scalar expansion. If the Interpret vector parameters as 1-D option is off, the block outputs a signal of the same dimensions and dimensionality as the parameters. If the Interpret vector parameters as 1-D option is on and the numeric parameters are row or column vectors (i.e., single row or column 2-D arrays), the block outputs a vector (1-D array) signal; otherwise, the block outputs a signal of the same dimensionality and dimensions as the parameters.
- Data Type Support
The Step block outputs real signals of type double.
- Parameters and Dialog Box
Note:
- Step time
The time, in seconds, when the output jumps from the Initial value parameter to the Final value parameter. The default is 1 second.
- Initial value
The block output until the simulation time reaches the Step time parameter. The default is 0.
- Final value
The block output when the simulation time reaches and exceeds the Step time parameter. The default is 1.
- Sample time
Sample rate of step. See Specifying Sample Time in the online documentation for more information.
- Interpret vector parameters as 1-D
If selected, column or row matrix values for the Step block's numeric parameters result in a vector output signal; otherwise, the block outputs a signal of the same dimensionality as the parameters. If this option is not selected, the block always outputs a signal of the same dimensionality as the block's numeric parameters. See Determining the Output Dimensions of Source Blocks.
- Enable zero crossing detection
Select to enable zero crossing detection to detect step times. For more information, see Zero-Crossing Detection.
Thank You
Multiply the input by a constant
- Library
Math Operations
- Description
The Gain block multiplies the input by a constant value (gain). The input and the gain can each be a scalar, vector, or matrix.
You specify the value of the gain in the Gain parameter. The Multiplication parameter lets you specify element-wise or matrix multiplication. For matrix multiplication, this parameter also lets you indicate the order of the multiplicands.
The gain is converted from doubles to the data specified in the block mask offline using round-to-nearest and saturation. The input and gain are then multiplied, and the result is converted to the output data type using the specified rounding and overflow modes.
- Data Type Support
The Gain block accepts a real or complex scalar, vector, or matrix of any data type supported by Simulink except Boolean. The Gain block supports fixed-point data types. If the input of the Gain block is real and the gain is complex, the output is complex.
- Parameters and Dialog Box
The Main pane of the Gain block dialog appears as follows:
- Gain
Specify the value by which to multiply the input. The gain may be a scalar, vector, or matrix. The gain may not be Boolean.
- Multiplication
Specify the multiplication mode:
Element-wise(K*u)
Each element of the input is multiplied by each element of the gain. The block performs expansions, if necessary, so that the input and gain have the same dimensions.
Matrix(K*u)
The input and gain are matrix multiplied with the input as the second operand.
Matrix(u*K)
The input and gain are matrix multiplied with the input as the first operand.
Matrix(K*u)(u vector)
The input and gain are matrix multiplied with the input as the second operand. The input and the output are required to be vectors and their lengths are determined by the dimensions of the gain.
- Sample time (-1 for inherited)
Specify the time interval between samples. To inherit the sample time, set this parameter to -1.
The Signal Data Types pane of the Gain block dialog appears as follows:
- Output data type mode
Set the data type and scaling of the output to be the same as that of the input, or to be inherited via an internal rule or by back propagation. Alternatively, choose to specify the data type and scaling of the output through the Output data type and Output scaling value parameters in the dialog.
If you select Inherit via internal rule for this parameter, Simulink chooses a combination of output scaling and data type that requires the smallest amount of memory consistent with accommodating the output range and maintaining the output precision of the block and with the word size of the targeted hardware implementation specified for the model. If the Device type parameter on the Hardware Implementation configuration parameters pane is set to ASIC/FPGA, Simulink chooses the output data type without regard to hardware constraints. Otherwise, Simulink chooses the smallest available hardware data type capable of meeting the range and precision constraints. For example, if the block multiplies an input of type int8 by a gain of int16 and ASIC/FPGA is specified as the targeted hardware type, the output data type is sfix24. If Unspecified (assume 32-bit Generic), i.e., a generic 32-bit microprocessor, is specified as the target hardware, the output data type is int32. If none of the word lengths provided by the target microprocessor can accommodate the output range, Simulink displays an error message in the Simulation Diagnostics Viewer.
- Output data type
Set the output data type. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
- Output scaling value
Set the output scaling using either binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
- Lock output scaling against changes by the autoscaling tool
Select to lock scaling of outputs. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
- Round integer calculations toward
Select the rounding mode for fixed-point operations.
- Saturate on integer overflow
Select to have overflows saturate.
The Parameter Data Types pane of the Gain block dialog appears as follows
- Parameter data type mode
Set the data type and scaling of the gain to be the same as that of the input, or to be inherited via an internal rule. Alternatively, choose to specify the data type and scaling of the gain through the Parameter data type, Parameter scaling mode, and Parameter scaling parameters in the dialog.
- Parameter data type
Specifies the data type of the Gain parameter. This parameter is visible only if you select Specify via dialog for the Parameter data type mode parameter.
- Parameter scaling mode
Set the mode to determine the scaling of the gain.
Use specified scaling
This mode allows you to set the scaling of the gain in the Parameter scaling parameter.
Best Precision: Element-wise
This mode sets binary points for the elements of the gain such that the precision of each element is maximized.
Best Precision: Row-wise
This mode sets a common binary point within each row of the gain such that the largest element of each row has the best possible precision.
Best Precision: Column-wise
This mode sets a common binary point within each column of the gain such that the largest element of each column has the best possible precision.
Best Precision: Matrix-wise
This mode sets a common binary point for all the elements of the gain such that the largest element has the best possible precision.
- Parameter scaling
Set the gain scaling using either binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Parameter data type mode parameter, and if you select Use specified scaling for the Parameter scaling mode parameter.
Characteristics
Thank You..
Continue....
- Specifying the Absolute Tolerance for the Block's States
By default Simulink uses the absolute tolerance value specified in the Configuration Parameters dialog box (see Absolute tolerance) to solve the states of the Transfer Fcn block. If this value does not provide sufficient error control, specify a more appropriate value in the Absolute tolerance field of the Transfer Fcn block's dialog box. The value that you specify is used to solve all the block's states.
- Data Type Support
The Transfer Fcn block accepts and outputs signals of type double.
- Parameters and Dialog Box
- Numerator coefficient
The row vector of numerator coefficients. A matrix with multiple rows can be specified to generate multiple output. The default is [1].
- Denominator coefficient
The row vector of denominator coefficients. The default is [1 1].
- Absolute tolerance
Absolute tolerance used to solve the block's states. You can enter auto or a numeric value. If you enter auto, Simulink determines the absolute tolerance (see Specifying Variable-Step Solver Error Tolerances). If you enter a numeric value, Simulink uses the specified value to solve the block's states. Note that a numeric value overrides the setting for the absolute tolerance in the Configuration Parameters dialog box
Characteristics
- Description
The Transfer Fcn block models a linear system by a transfer function of the Laplace-domain variable s. The block can model both single-input single-output (SISO) and single-input multiple output (SIMO) systems.
This block assumes that the transfer function has the following form:
Where u and y are the system's input and outputs, respectively, nn and nd are the number of numerator and denominator coefficients, respectively. num and den contain the coefficients of the numerator and denominator in descending powers of s. The order of the denominator must be greater than or equal to the order of the numerator. This block also assumes that the transfer functions for the outputs of a multiple output system have the same denominator and that the numerators of the transfer functions have the same order.
To model a single-output system, enter a vector containing the system transfer function's numeric coefficients in the Numerator coefficient field in the block's parameter dialog box. Enter a vector containing the transfer function's denominator coefficients in the Denominator coefficient field. In this case, the input and output of the block are scalar time-domain signals.
To model a multiple-output system, enter a matrix in the Numerator coefficient field where each row of the matrix contains the numerator coefficients of a transfer function that determines one of the block's outputs. Enter a vector containing the denominator coefficients common to the system's transfer functions in the Denominator coefficient field. In this case, the block's input is a scalar and the block's output is a vector each of whose elements is an output of the system modeled by the block.
Initial conditions are preset to zero. If you need to specify initial conditions, convert to state-space form using tf2ss and use the State-Space block. The tf2ss utility provides the A, B, C, and D matrices for the system.
- Transfer Fcn Display
The numerator and denominator are displayed on the Transfer Fcn block depending on how they are specified:
- If each is specified as an expression, a vector, or a variable enclosed in parentheses, the icon shows the transfer function with the specified coefficients and powers of s. If you specify a variable in parentheses, the variable is evaluated. For example, if you specify Numerator as [3,2,1] and Denominator as (den) where den is [7,5,3,1], the block looks like this:
- If each is specified as a variable, the block shows the variable name followed by (s). For example, if you specify Numerator as num and Denominator as den, the block looks like this
Continue...
- Sample time (-1 for inherited)
Specify the time interval between samples. To inherit the sample time, set this parameter to -1.
- The Signal Data Types pane of the Sum block dialog appears as follows:
- Require all inputs to have same data type
Select this parameter to require that all inputs must have the same data type.
- Output data type mode
Specify the output data type and scaling to be the same as the first input, or inherit the data type and scaling from an internal rule or by backpropagation. You can also choose a built-in data type from the drop-down list. Lastly, if you choose Specify via dialog, the Output data type, Output scaling value, and Lock output scaling against changes by the autoscaling tool parameters become visible.
- Output data type
Specify any data type, including fixed-point data types. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.
- Output scaling value
Set the output scaling using binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter.Lock output scaling against changes by the autoscaling tool.
Select to lock scaling of outputs. This parameter is only visible if you select Specify via dialog for the Output data type mode parameter. Round integer calculations toward. Select the rounding mode for fixed-point operations.
- Saturate on integer overflow
Select to have overflows saturate
- Characteristic
Figure below show the sum block..
- Sum, Add, Subtract, Sum of Elements
Add or subtract inputs
- Library
Math Operations
- Description
The Sum block performs addition or subtraction on its inputs. This block can add or subtract scalar, vector, or matrix inputs. It can also collapse the elements of a single input vector.
You specify the operations of the block with the List of signs parameter. Plus (+), minus (-), and spacer (|) characters indicate the operations to be performed on the inputs:
If there are two or more inputs, then the number of + and - characters must equal the number of inputs. For example, "+-+" requires three inputs and configures the block to subtract the second (middle) input from the first (top) input, and then add the third (bottom) input.
All nonscalar inputs must have the same dimensions. Scalar inputs will be expanded to have the same dimensions as the other inputs. A spacer character creates extra space between ports on the block's icon.
If only addition of all inputs is required, then a numeric parameter value equal to the number of inputs can be supplied instead of "+"characters. If only one vector is input, then a single "+" or "-" will collapse the vector using the specified operation.
The Sum block first converts the input data type(s) to the output data type using the specified rounding and overflow modes, and then performs the specified operations.
- Data Type Support
The Sum block accepts real or complex signals of any data type supported by Simulink, including fixed-point data types. The inputs may be of different data types unless you select the Require all inputs to have same data type parameter.
- Parameters and Dialog Box
The Main pane of the Sum block dialog appears as follows:
- Icon shape
- List of signs
Enter as many plus (+) and minus (-) characters as there are inputs. Addition is the default operation, so if you only want to add the inputs, enter the number of input ports. For a single vector input, "+" or "-" will collapse the vector using the specified operation.
You can manipulate the positions of the input ports on the block by inserting spacers (|) between the signs in the List of signs parameter. For example, "++|--" creates an extra space between the second and third input ports.
Thank You..
Subscribe to:
Posts (Atom)
Electric machines play an important role in industry as well as our day to day life. They are used to generate electrical power in power plants and provide mechanical work in industries. They are also an indispensable part of our daily lives. Electric machines are very important pieces of equipment in our everyday lives. The DC machine is considered to be basic electric machines.
The aim of this final year project is to introduce students to the modeling of power components and to use computer simulation as a tool for conducting transient and control studies. Simulation can be very helpful in gaining insights to the dynamic behavior and interactions that are often not readily apparent from reading theory. Simulation is often chosen by engineers to study transient and control performance or to test conceptual designs.
MATLAB/SIMULINK is used because of the short learning curve that most students require to start using it, its wide distribution, and its general purpose of nature. This will demonstrate the advantages of using MATLAB for analyzing power system steady-state behavior and its capabilities for simulating transients in power systems and power electronics, including control system dynamic behavior
The aim of this final year project is to introduce students to the modeling of power components and to use computer simulation as a tool for conducting transient and control studies. Simulation can be very helpful in gaining insights to the dynamic behavior and interactions that are often not readily apparent from reading theory. Simulation is often chosen by engineers to study transient and control performance or to test conceptual designs.
MATLAB/SIMULINK is used because of the short learning curve that most students require to start using it, its wide distribution, and its general purpose of nature. This will demonstrate the advantages of using MATLAB for analyzing power system steady-state behavior and its capabilities for simulating transients in power systems and power electronics, including control system dynamic behavior

