0% found this document useful (0 votes)
15 views

PID3633593

This document discusses modeling and simulating analog filters using LabVIEW software. It begins by introducing different types of electrical filters and their purposes. Then it presents the mathematical models for an RC low-pass filter and high-pass filter. These models are based on equations that describe the behavior and transfer characteristics of the filters. The models are then implemented in LabVIEW programs to simulate the operation of the RC filters and analyze their frequency responses. The goal is to analyze using virtual instrumentation for studying electrical filters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

PID3633593

This document discusses modeling and simulating analog filters using LabVIEW software. It begins by introducing different types of electrical filters and their purposes. Then it presents the mathematical models for an RC low-pass filter and high-pass filter. These models are based on equations that describe the behavior and transfer characteristics of the filters. The models are then implemented in LabVIEW programs to simulate the operation of the RC filters and analyze their frequency responses. The goal is to analyze using virtual instrumentation for studying electrical filters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/308671984

LabVIEW modeling and simulation, of the low-pass and high-pass analog filters

Conference Paper · June 2015


DOI: 10.1109/EMES.2015.7158410

CITATIONS READS
8 3,850

2 authors, including:

Bogdan Mihai
Lucian Blaga University of Sibiu
29 PUBLICATIONS 136 CITATIONS

SEE PROFILE

All content following this page was uploaded by Bogdan Mihai on 04 November 2017.

The user has requested enhancement of the downloaded file.


LabVIEW modeling and simulation, of the low-
pass and high-pass analog filters
Mihai Bogdan

frequency bands through modulation operation and the


Abstract— Some programs for simulating different types of "mixing" of those at the transmission. At the reception, the
filters are developed using LabView software. Implementing a talks were "mixed" are "separated" through an operation of
simulation program of an analog filter requires the prior attenuation at all the spectral components of the except in
establishment of mathematical model. which was placed the call. That's operation what separates
As a general purpose programming environment, LabVIEW mixed calls and selectively extract information is performed
offers possibility of achieving some user programs for plotting using an electronic device called filter and the function
frequency characteristics of passive and active analog filters, if
established beforehand mathematical models that characterize
performed by this is called filtering.
their behavior. In general, electrical filters can be break down into three
The scientific objectives of this paper are: basic categories: passive analog filters (in which they are used
-the analysis of the possibilities of using virtual the passive circuit elements: resistors, capacitors, coils), active
instrumentation in the study of electrical filters; analog filters (made with operational amplifiers and passive
-implementation of virtual instruments for analysis and circuit elements: resistors and capacitors) and digital filters
simulation of analog filters, made with passive components. (made with digital processing devices of electrical signals
such as: digital signal processors (DSP) or microcontroller.
Index Terms—analog filter, block diagram, front panel, high- Whatever the type of the filter, its design is inevitably
pass filters, low-pass filters, virtual instrument. preceded by a method of analysis. This activity involves the
study of the frequency characteristics of the filter as well as
getting the frequency dependence of the phase-increment
I. INTRODUCTION feature between output signal and the input [3].
Electrical signals, as a carrier of information, are Analysis of electrical filters is done at present on the
characterized by a number of parameters such as: voltage, computer, using the appropriate software for this purpose. The
current, polarity, the variation in time of the voltage or current, Romanian academic environment have, in this respect, the
the frequency, voltage or current phase. The value of these well-known software packages Matlab and LabVIEW. These
parameters and their changes in time depends on the evolution are widely used both in design and in the research and study of
of electric or non-electric phenomenon they represent [8]. electrical filters, each of these tools provides particularly
Often, a number of electrical disruptive factors, whose strong in practical problem solving related to signal
source cannot always be identified, acting on the electrical processing, identification systems, statistical control and
useful signal that carry the information, misrepresenting such processing of experimental data [4].
information drawn up or to be transmitted to the receiving The Matlab (MATrix LABoratory) is a software package
source. The result is that the information received by the dedicated to numerical matrix computation and graphics being
receiver corresponds to reality source less often or not at all. one of the most agreed upon work environments for a wide
These undesirable disturbing phenomena can be alleviated, variety of users. LabVIEW (Laboratory Virtual
but never completely eliminated with the help of additional Instrumentation Engineering Workbench) offers in addition,
devices, called filters. Their basic function is to filter the the facilities in terms of combining hardware with software
disturbance which overlap the electric useful signal, and very elegant way of implementation about graphics
eliminating in a higher or lower their effects. programs.
The filter function can be implemented not only in order to
improve the quality of information, it can be implemented for II. SETING THE MATHEMATICAL MODEL OF THE RC LOW-PASS
the purpose of extracting information [9]. ANALOG FILTERS
In the most simple terms, filtering function carried out for
Implementing a program of simulation of an analog filter
the purpose of extracting information can be exemplified by
requires the prior establishment of mathematical model. The
the principle that underlies the telephony. This procedure
simple knowledge of the transfer characteristic in the filter
consists in the transfer of voice spectrum in the distinct
frequency gives the user enough data to be able to pass the
realization of it having the correct functioning of the warranty
March 30, 2015 for specific operating conditions.
Mihai Bogdan, University of Lucian Blaga Sibiu, Faculty of Engeneering, Often, in practice, it is important the dynamic regime
Str. Emil Cioran, no.4, 550025 Sibiu, Romania, E-Mail:
[email protected].
behaviour of the filter, such as: changing the input and output
impedance, the behaviour of the power supply coupling and where:
uncoupling, changing the values of the circuit components in I - represents the complex value of the current determined by
the structure of the filter, etc. the circuit made up of elements of R-C, when at the ends of
In the current paragraph, will be presented a method of the circuit is applied the voltage U in ;
studying analog low pass filter and analog high pass filter,
respectively, achieved with passive circuit components: Xc - represents the capacitor reactance:
resistor -capacitor configuration "Γ". 1 1
Xc = = . (7)
The "Γ" structure of an order one R-C low pass filter is ω⋅C 2⋅π⋅f ⋅C
presented in the figure below: In these conditions, the filter gain module, becomes:
U − j ⋅ Xc 1
H( j ⋅ ω) = A u = ies = = (8)
U in R − j ⋅ Xc R
1+ j
Xc
Relationships (5) and (8) have led to the implementation of
the LabVIEW simulation programme, of the RC low-pass
Fig. 1. The RC low-pass filter filter operation.

The differential equations that describe the behavior of the III. SETING THE MATHEMATICAL MODEL OF THE RC
RC low-pass filter, are the following: HIGH-PASS ANALOG FILTERS
⎧u in (t ) = R ⋅ i( t ) + u c ( t ) In order to establish the system of differential equations that

⎨ du c ( t ) (1) characterize the functioning RC high pass filter, proceed
⎪⎩i( t ) = C dt similarly to the aforementioned case.
where: The structure of the " Γ " of such a filter is shown in the figure
- i (t) is the current set through the branch circuit made up below :
of R and capacitor C, when at the entry terminals is applied of
the voltage uin(t);
- uc (t) is the voltage across the capacitor C.
Notice that: u c ( t ) = u ies ( t ) .
The system of differential equations shown above, describe
mathematically, the behaviour of RC low-pass filter. Fig. 2. The RC high-pass filter
⎧dt → Δt
The finite values, ⎨ (2) According to the circuit shown in this figure , we can write
⎩du c ( t ) → Δu c ( t ) equations:
After making the regular processing, to get to the next form ⎧u in (t ) = u c (t ) + uies (t )
of expression of the output voltage of the RC low-pass filter: ⎪
⎪ duc (t ) (9)
u (t) u (0 ) ⎨i(t ) = C
u c ( t ) = in + c (3) ⎪ dt
R ⋅C Δt
1+ 1+ ⎪⎩u ies (t ) = R ⋅ i(t )
Δt R ⋅C
Where: Turning to finite values as shown below :
Δu c ( t ) = u c ( t ) − u c ( t 0 ) , (4) ⎧du c (t ) → u c (t ) − u C (t 0 ) (10)

Δ t = t − t0 ⎩dt → Δt = t − t 0
Within the simulation program, due to restrictions imposed and performing the necessary processing , arrive at the
by the LabVIEW programming language, relationship (3) was following form of expression fully describing the behavior
used in the form: relations RC high-pass filter in the time domain :
Uc = Ui/(1 + R * C/dt) + Uc0/(1+ dt/(R * C)) (5) ⎧ uin (t ) u (t )
Initial conditions were set out as follows: Uc0(t=0)=0 at the ⎪⎪uc (t ) = R ⋅C
+ c 0
Δt (11)
⎨ 1+ 1+
time of the initial time t=0, i.e. the capacitor is completely Δ t R ⋅ C

discharged at the application of the input voltage. ⎪⎩uies (t ) = uin (t ) − uc (t )
In order to plot the frequency characteristics of RC low-
The initial conditions for this system are: uc ( t = 0) = 0 and
pass filter, for added convenience, it was called the method of
uies (t = 0) = 0 .
complex numbers representation, of the electrical quantities.
Within the simulation program, due to restrictions imposed by
Thus, for the electrical circuit shown in Figure 1, are valid the
the LabVIEW programming language, relationship (11) was
next relationships:
used in the form:
⎧ U in
⎧Uc = Ui/(1 + R * C/dt) + Uc0/(1 + dt/(R * C)) (12)
⎪I = ⎨
⎨ R − j⋅ Xc (6)
⎪U = I ⋅ (− j ⋅ X ) ⎩Ue = Ui - Uc
⎩ ies c
In order to plot the frequency characteristics of RC high-
pass filter, for added convenience, it was called the method of
complex numbers representation of the electrical quantities.
Thus, for the electrical circuit shown in Figure 2, are valid the
next relationships:
⎧ U in
⎪I = (13)
⎨ R − j ⋅ Xc
⎪U = I ⋅ R
⎩ ies
which results in :
U ies R 1 (14)
H ( j ⋅ ω ) = Au = = =
U in R − j ⋅ Xc Xc
1− j
R
Fig. 3.The Front Panel of the RC low-pass and high-pass filter
Relationships (12) and (14) have led to the implementation
of the LabVIEW simulation programme, of the RC low-pass
The main program consists of a main While loop. Within
filter operation.
this loop is observed a Case structure containing two sub
diagrame, corresponding to the two types of filters (RC low-
IV. IMPLEMENTATION IN LABVIEW OF VIRTUAL INSTRUMENT
TO STUDY ELECTRICAL FILTERS
pass filters and RC high-pass filters), and another Case
structure which selects the image containing the current filter
In order to simulate the RC low pass filter and the RC high circuit. Either sub diagrame contained in the main Case
pass filter, was implemented a LabView simulation program. structure contains a structure consisting of two sequential
The front panel of virtual instrument for simulation of the
frames: one frame for the calculation of the voltage uc(t) and
RC low pass filters and the RC high pass filters, looks like the
one frame for the determination the module and phase of the
Fig. 3. The block diagram of the program is shown in Fig. 4.
transfer function in the frequency domain.

Fig. 4.The Block Diagram of the RC low-pass and high-pass filter


The sub diagram corresponding to the RC low-pass - filter
can be seen in Figure 4. This sub diagram contains a For loop V. CONCLUSION
in which one can distinguish Formula Node structure. Within Implementing a proper simulation program of an analog
this structure was placed equation (5) underlying the filter, requires prior determination of its mathematical model.
calculation of the output voltage uc(t) for each iteration Δt. LabVIEW user programs provide opportunities for plotting
The figure below shows the frame that contains the routine frequency characteristics of passive and active analog filters, if
for determination module and phase of the transfer function. established beforehand mathematical models that characterize
their behavior.
Being established differential equations that characterize the
behavior of a electrical filter, implement a program for solving
them through state variable method poses no particular
problem if the structure is not very complicated filters. By
solving the differential equations that characterize computer
studying filter, the user get the graphical representation in the
time domain of the input and output signals.
By using the method of representation in complex of the
electrical quantities and making use the functions provided by
LabVIEW programming environment, we can be obtained, in
an elegant manner, the graphical representation of the gain and
the phase, depending on the frequency.
By the controls and indicators provided by the LabVIEW
programming environment, the user can build their own
virtual instruments necessary both when studying the filters
and in their design stage.

REFERENCES
[1] Bogdan, M., “Virtual instrument, for frequency measurement and
spectral analysis”, Journal of Electrical and Electronics Engineering
Fig. 5. The routine for determining module and phase for RC low-pass filter ISSN/ EISSN: 18446035 20672128 Year: 2011 Volume: 4 Issue: 1
Pages: 19-22
Appropriate routine for calculation of the output voltage in [2] Bogdan, M., “Virtual signal generator using the NI-USB 6008 data
acquisition”, Nonconventional Technologies Review, Volume XVII, Nr.
the time domain is shown in the image below. 2/2013, ISSN 1454-3087, p.5-8, June, 2013.
[3] Bogdan, M., “Sampling rate and aliasing on a virtual laboratory”,
Journal of Electrical and Electronics Engineering, Vol.2, Nr.2, 2009,
ISSN 1844-6035, University of Oradea Publisher, 2009.
[4] Sweta Triphaty – „Analisys of Digital IIR Filter Using LabView”,
Departament of Electrical and Instrumentation Engineering, Thapar
University, 2010.
[5] Bogdan, M., “Virtual home alarm system with NI myDAQ and
LabVIEW”, Nonconventional Technologies Review, Volume XVII, Nr.
2/2013, ISSN 1454-3087, p.9-12, June, 2013.
[6] Mitran, R., Bogdan, M., Bechet, P., A Novel Algorithm for Frequency
Hopping Detection, International Journal of Research and Reviews in
Computer Science, (IJRRCS) Vol. 2, No. 2, April 2011, ISSN: 2076-
0930.
[7] Sheenu Thapar, Parminder Kaur, Neha Aggarwal, “A Low Pass FIR
Filter Design Using Genetic Algorithm Based Artificial Neural
Network”, International Journal of Computer Technology and
[8] Bogdan M., “Using NI USB-6008 DAQ device, for frequency and
spectral measurement”, Acta Universitatis Cibiniensis-Technical series,
Vol. LXI, ISSN 1583-7149, Sibiu, 2010.
[9] Rahman Jamal, Mike Cerna, John Hanks, “Designing Filters Using the
Digital Filter Design Toolkit”, Application note-097, National
Instruments, 1996.
[10] Bogdan, M., Measurement experiment, using NI USB-6008 data
acquisition, Journal of Electrical and Electronics Engineering, Vol.2,
Nr.1, 2009, ISSN 1844-6035, University of Oradea Publisher, 2009.
Fig. 6. The routine for determining the output voltage of the high-pass RC- [11] Bogdan M., “Using NI USB-6008 DAQ device, for frequency and
filter spectral measurement”, Acta Universitatis Cibiniensis-Technical series,
Vol. LXI, ISSN 1583-7149, Sibiu, 2010.

View publication stats

You might also like