<< Chapter < Page Chapter >> Page >
(a) Adding Outputs, (b) Choosing Data Types

Finally, add numeric indicators in a similar fashion as indicated earlier. [link] shows the completed block diagram and front panel.

(a) Completed Block Diagram, (b) Completed Front Panel

Building a signal generation system using hybrid programming

In this section, let us see how to generate and display aperiodic continuous-time signals or pulses in the time domain. One can represent such signals with a function of time. For simulation purposes, a representation of time t size 12{t} {} is needed. Note that the time scale is continuous while computer programs operate in a discrete fashion. This simulation can be achieved by considering a very small time interval. For example, if a 1-second duration signal in millisecond increments (time interval of 0.001 second) is considered, then one sample every 1 millisecond and a total of 1000 samples are generated for the entire signal. This continuous-time signal approximation is discussed further in later chapters. It is important to note that there is a finite number of samples for a continuous-time signal, and, to differentiate this signal from a discrete-time signal, one must assign a much higher number of samples per second (very small time interval).

Continuous-Time Signals

[link] shows two continuous-time signals x1 ( t ) size 12{x1 \( t \) } {} and x2 ( t ) size 12{x2 \( t \) } {} with a duration of 3 seconds. By setting the time interval dt to 0.001 second, there is a total of 3000 samples at t = 0,0 . 001 , 0 . 002 , 0 . 003 , . . . . . . . , 2 . 999 size 12{t=0,0 "." "001",0 "." "002",0 "." "003", "." "." "." "." "." "." "." ,2 "." "999"} {} seconds.

The signal x1 ( t ) size 12{x1 \( t \) } {} can be represented mathematically as follows:

x1 ( t ) = { 0 0 t < 1 1 1 t < 2 0 2 t < 3 size 12{x1 \( t \) = left lbrace matrix { 0 {} # 0<= t<1 {} ## 1 {} # 1<= t<2 {} ## 0 {} # 2<= t<3{} } right none } {}

To simulate this signal, use the LabVIEW MathScript functions ones and zeros . The signal value is zero during the first second, which means the first 1000 samples are zero. This portion of the signal is simulated with the function zeros(1,1000) . In the next second (next 1000 samples), the signal value is 2, and this portion is simulated by the function 2*ones(1,1000) . Finally, the third portion of the signal is simulated by the function zeros(1,1000) . In other words, the entire duration of the signal is simulated by the following .m file function:

x1=[ zeros(1,1/dt) 2*ones(1,1/dt) zeros(1,1/dt)]

The signal x2 ( t ) size 12{x2 \( t \) } {} can be represented mathematically as follows:

x2 ( t ) = { 2t 0 t < 1 2t + 4 1 t < 2 0 2 t < 3 size 12{x2 \( t \) = left lbrace matrix { 2t {} # 0<= t<1 {} ## - 2t+4 {} # 1<= t<2 {} ## 0 {} # 2<= t<3{} } right none } {}

Use a linearly increasing or decreasing vector to represent the linear portions. The time vectors for the three portions or segments of the signal are 0:dt:1-dt , 1:dt:2-dt and 2:dt:3-dt . The first segment is a linear function corresponding to a time vector with a slope of 2; the second segment is a linear function corresponding to a time vector with a slope of -2 and an offset of 4; and the third segment is simply a constant vector of zeros. In other words, simulate the entire duration of the signal for any value of dt by the following .m file function:

x2=[2*(0:dt:(1-dt)) -2*(1:dt:(2-dt))+4 zeros(1,1/dt)].

[link] and [link] show the block diagram and front panel of the above signal generation system, respectively. Display the signals using a Waveform Graph (Controls Express Waveform Graph) and a Build Waveform function (Function Programming Waveform Build Waveform) . Note that the default data type in MathScript is double precision scalar. So whenever an output possesses any other data type, one needs to right-click on the output and select the Choose Data Type option. In this example, x1 and x2 are double precision one-dimensional arrays that are specified accordingly.

Questions & Answers

it is the relatively stable flow of income
Chidubem Reply
what is circular flow of income
Divine Reply
branches of macroeconomics
SHEDRACK Reply
what is Flexible exchang rate?
poudel Reply
is gdp a reliable measurement of wealth
Atega Reply
introduction to econometrics
Husseini Reply
Hi
mostafa
hi
LEMLEM
hello
Sammol
hi
Mahesh
bi
Ruqayat
hi
Ruqayat
Hi fellas
Nyawa
hey
Sammol
hi
God
hello
Jahara
Good morning
Jorge
hi
abubakar
hi
Nmesoma
hi
Mahesh
Hi
Tom
Why is unemployment rate never zero at full employment?
Priyanka Reply
bcoz of existence of frictional unemployment in our economy.
Umashankar
what is flexible exchang rate?
poudel
due to existence of the pple with disabilities
Abdulraufu
the demand of a good rises, causing the demand for another good to fall
Rushawn Reply
is it possible to leave every good at the same level
Joseph
I don't think so. because check it, if the demand for chicken increases, people will no longer consume fish like they used to causing a fall in the demand for fish
Anuolu
is not really possible to let the value of a goods to be same at the same time.....
Salome
Suppose the inflation rate is 6%, does it mean that all the goods you purchase will cost 6% more than previous year? Provide with reasoning.
Geetha Reply
Not necessarily. To measure the inflation rate economists normally use an averaged price index of a basket of certain goods. So if you purchase goods included in the basket, you will notice that you pay 6% more, otherwise not necessarily.
Waeth
discus major problems of macroeconomics
Alii Reply
what is the problem of macroeconomics
Yoal
Economic growth Stable prices and low unemployment
Ephraim
explain inflationcause and itis degre
Miresa Reply
what is inflation
Getu
increase in general price levels
WEETO
Good day How do I calculate this question: C= 100+5yd G= 2000 T= 2000 I(planned)=200. Suppose the actual output is 3000. What is the level of planned expenditures at this level of output?
Chisomo Reply
how to calculate actual output?
Chisomo
how to calculate the equilibrium income
Beshir
Criteria for determining money supply
Thapase Reply
who we can define macroeconomics in one line
Muhammad
Aggregate demand
Mohammed
C=k100 +9y and i=k50.calculate the equilibrium level of output
Mercy Reply
Hi
Isiaka
Hi
Geli
hy
Man
👋
Bahunda
hy how are you?
Man
ys
Amisha
how are you guys
Sekou
f9 guys
Amisha
how are you guys
Sekou
ys am also fine
Amisha
fine and you guys
Geli
from Nepal
Amisha
nawalparasi district from belatari
Amisha
nd u
Amisha
I am Camara from Guinea west Africa... happy to meet you guys here
Sekou
ma management ho
Amisha
ahile becheclor ho
Amisha
hjr ktm bta ho ani k kaam grnu hunxa tw
Amisha
belatari
Amisha
1st year ho
Amisha
nd u
Amisha
ahh
Amisha
kaha biratnagar
Amisha
ys
Amisha
kina k vo
Amisha
money as unit of account means what?
Kalombe
A unit of account is something that can be used to value goods and services and make calculations
Jim
all of you please speak in English I can't understand you're language
Muhammad
I want to know how can we define macroeconomics in one line
Muhammad
it must be .9 or 0.9 no Mpc is greater than 1 Y=100+.9Y+50 Y-.9Y=150 0.1Y/0.1=150/0.1 Y=1500
Kalombe
Mercy is it clear?😋
Kalombe
hi can someone help me on this question If a negative shocks shifts the IS curve to the left, what type of policy do you suggest so as to stabilize the level of output? discuss your answer using appropriate graph.
Galge Reply
if interest rate is increased this will will reduce the level of income shifting the curve to the left ◀️
Kalombe
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, An interactive approach to signals and systems laboratory. OpenStax CNX. Sep 06, 2012 Download for free at http://cnx.org/content/col10667/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'An interactive approach to signals and systems laboratory' conversation and receive update notifications?

Ask