0% found this document useful (0 votes)
106 views17 pages

Cyber Eng G Assignment

The document summarizes the design and implementation of various radio frequency circuits in LTSpice. It includes: 1) Design and simulation of an LC tuned circuit at 674kHz. 2) Design and simulation of a low pass filter with a cutoff of 700kHz. 3) Design and simulation of a band pass filter to pass frequencies from 800kHz to 1700kHz using cascaded low pass and high pass filters. 4) Description of the design of an Armstrong indirect FM modulator.

Uploaded by

Rajnish Sharma
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)
106 views17 pages

Cyber Eng G Assignment

The document summarizes the design and implementation of various radio frequency circuits in LTSpice. It includes: 1) Design and simulation of an LC tuned circuit at 674kHz. 2) Design and simulation of a low pass filter with a cutoff of 700kHz. 3) Design and simulation of a band pass filter to pass frequencies from 800kHz to 1700kHz using cascaded low pass and high pass filters. 4) Description of the design of an Armstrong indirect FM modulator.

Uploaded by

Rajnish Sharma
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/ 17

Assignment of

Cyber Engineering (CTEC5805)

Submitted By- Rajnish Sharma


Student ID- P2747455
Contents
TASK 1 ........................................................................................................................................................... 3
A. Designing of LC tunned circuit at 674 KHz ....................................................................................... 3
Implementation of circuit in LTspice ................................................................................................... 3
B. Designing of Low Pass Filter to pass frequencies up to 700 KHz .................................................... 5
Implementation of circuit in LT spice .................................................................................................. 5
C. Designing of Band Pass Filter to pass a range of frequencies 800KHz – 1700KHz ......................... 6
Implementation of Band Pass filter using LTSpice .............................................................................. 7
D. Designing Armstrong indirect FM modulator ..................................................................................... 9
Calculations: ......................................................................................................................................... 9
TASK 2 ......................................................................................................................................................... 11
Design of a CAN communication network for a car .............................................................................. 11
TASK 3 ......................................................................................................................................................... 14
A. Text to PDU conversion at User-A ................................................................................................. 14
B. Fragmentation at AP-1: .................................................................................................................. 15
Defragmentation at AP-2: .................................................................................................................. 15
C. PDU-to-Text Conversion at User-B ................................................................................................ 16
References .................................................................................................................................................. 17
TASK 1

A. Designing of LC tunned circuit at 674 KHz


To begin, we need to determine the capacitance and inductance values for the circuit. The
resonant frequency of an LC tank circuit can be calculated using the following formula:[6]
𝟏
𝒇𝒓 =
𝟐𝝅√𝑳𝑪

Where, 𝑓𝑟 is the resonant frequency in Hz, L is the inductance in Henrys and C is the capacitance
in Farads. In this case, we want the resonant frequency to be 674 KHz.

By assuming L= 10mh we can solve the equation and can get the value of C

𝟏
C=
𝟒𝝅𝟐 ×𝑳×𝒇𝟐

Since we have the value of resonant frequency in KHz we first need to convert it in Hz which will
be 674 × 103 Hz and same with the inductance, we will convert the inductance 10mh to H and
it will be 0.01H or 10−2 H.

By solving the equation we will get the value of C which is 5.576 pF. Therefore, to design an LC-
tuned circuit at 674 KHz, we need an inductor of approximately 10 mH and a capacitor of
approximately 5.576pF.

Implementation of circuit in LTspice

• Open LTSpice and create a new schematic.


• Place an inductor component and set its value to 10 mH.
• Place a capacitor component and set its value to 5.576 pF.
• Connect one terminal of the inductor to one terminal of the capacitor.
• Connect the other terminal of the inductor to the input/source.
• Connect the other terminal of the capacitor to the ground/reference.
• We will get our results by doing AC analysis and after running the circuit.
Figure 1 Implementation of LC tunned circuit in LTSpice

Figure 2 running LC tunned circuit in LTSpice


B. Designing of Low Pass Filter to pass frequencies up to 700 KHz

In order to allow frequencies below a specific cutoff frequency to pass through while
attenuating higher frequencies, a low pass filter is designed. For this particular scenario, the
objective is to create a low pass filter that permits frequencies up to 700 KHz to pass through.

The RC filter is a widely employed low-pass filter, composed of a resistor (R) and a capacitor (C)
connected in series. The cutoff frequency (fc) of an RC filter can be determined using the
following formula:[6]
𝟏
𝒇𝒄 =
𝟐𝝅𝑹𝑪
Since the value of 𝑓𝑐 (700KHz) is known and we need to find the value of R and C. We can assume the
value of R= 1K to find the value of C.

Since value of 𝑓𝑐 is in KHz so it will be 700 × 103 and value of R will be 1 × 103

𝟏 𝟏
C= = C=
𝟐𝝅𝑹𝑪 𝟐×𝟑.𝟏𝟒×𝟏×𝟏𝟎𝟑× 𝟕𝟎𝟎×𝟏𝟎𝟑

The value of C which we will get after conversion is 227.36pF

Implementation of circuit in LT spice

After setting up the circuit, conduct a simulation to observe the frequency response of the low-
pass filter. During the simulation, the output should exhibit the characteristic of allowing
frequencies below 700 KHz to pass through with minimal attenuation. On the other hand,
higher frequencies should be attenuated, indicating a reduction in their magnitude.

Figure 3 Implementation of low pass filter circuit in LTSpice


Figure 4 Running low pass filter circuit in LTSpice

C. Designing of Band Pass Filter to pass a range of frequencies 800KHz –


1700KHz

To selectively pass a specific range of frequencies while attenuating frequencies outside that range, a
bandpass filter is designed. In this scenario, the objective is to create a bandpass filter that allows
frequencies between 800 KHz and 1700 KHz to pass through.[1]

A commonly used approach for constructing a bandpass filter involves combining a low pass filter and a
high pass filter. The low pass filter attenuates frequencies above a certain cutoff frequency, while the
high pass filter attenuates frequencies below a different cutoff frequency. By cascading these filters
together, we can achieve the desired bandpass response.[6]

To design the bandpass filter, we begin by determining the values of the components for the low pass
filter and the high pass filter.

For the low pass filter, we can utilize the same design outlined in the previous section with a cutoff
frequency of 1700 KHz.

For the high pass and low pass filter same formula will be used which we have used in previous task.
𝟏
𝒇𝒄 = 𝟐𝝅𝑹𝑪
For High pass filter
Since we have 𝑓𝑐 = 800KHz and let assume, C is 10 nF and now we have to find R. By doing the
calculations we have done in the previous tasks we will get our R.
Value of R we have got is 19.9 Ω.
For low pass filter
We have 𝑓𝑐 = 1700𝐾𝐻𝑧 and let assume C is 10nF and now again we have to find the value of R
, which will be after the calculations is 9.4 Ω.
Now we can start making the Band pass filter by combining these both high pass and low pass
filter.

Implementation of Band Pass filter using LTSpice

• Implement the high pass filter using resistor of 19.9Ω and capacitor of 10nF
• Implement the high pass filter using a resistor of 9.4Ω and a capacitor of 10nF.
• Connect the output of the low pass filter to the input of the high pass filter.
• Connect the input/source to the input of the high-pass filter.
• Connect the output of the low pass filter to the output/load.
• Connect the ground/reference to the ground nodes of both filters.

Figure 5 Implementation of band pass filter circuit in LTSpice


Figure 6 Running of band pass filter circuit in LTSpice
D. Designing Armstrong indirect FM modulator

To design an Armstrong indirect FM modulator, you can follow the following steps:
1. Determine the frequency deviation (Δf) of the FM signal using the formula Δf = kf * Af,
where kf is the frequency sensitivity constant and Af is the modulating frequency.
Assuming kf to be 2π * 5 Hz / V, and let's assume V = 1 V, then kf = 31.4 Hz/V and Δf =
314 Hz.
2. Calculate the maximum and minimum frequency of the FM signal using the formula
fmax = fc + Δf and fmin = fc - Δf, where fc is the carrier frequency. Assuming fc to be
97.3 MHz, then fmax = 97.300314 MHz and fmin = 97.299686 MHz.
3. Choose a frequency range for the modulating signal that covers the desired frequency
deviation. Let's select fa = 20 kHz and Af = 5 Hz.
4. Use a frequency doubler to double the frequency of the modulating signal to 40 kHz.
5. Implement a bandpass filter to allow frequencies in the range of 800 kHz to 1.7 MHz,
which includes the carrier frequency.
6. Utilize a mixer to combine the filtered signal with a local oscillator signal at a frequency
between 400 kHz and 500 kHz. This mixing process will generate an intermediate
frequency (IF) signal in the range of 303.3 kHz to 403.3 kHz.
7. Apply another frequency doubler to double the frequency of the IF signal, resulting in a
range of 606.6 kHz to 806.6 kHz.
8. Incorporate a low-pass filter to allow frequencies up to 700 kHz, eliminating unwanted
sidebands.
9. Implement an LC-tuned circuit at 674 kHz to further filter and fine-tune the signal,
adjusting it to the desired carrier frequency of 97.3 MHz.[6]
Finally, amplify and transmit the filtered signal as an FM signal.
Calculations:
The modulator is shown below and we need to determine 𝑀1 , 𝑀2 and 𝑓𝐿𝑜 [9]

Figure 7 Block diagram of Armstrong indirect FM modulator


The NBFM generator generates 𝑓𝑐1 = 20 kHz and ∆𝑓1 = 5Hz. The final WBFM should have 𝑓𝑐4 =
97.3 MHz and ∆𝑓4 = 10.24 kHz
∆𝑓 1024
We will first find the total factor of frequency 𝑀1 . 𝑀2 = ∆𝑓4 = = 211
1 5

Because only frequency doublers can be used, we have three equations 𝑀1 = 2𝑛1 , 𝑀2 = 2𝑛2
and 𝑛1 + 𝑛2 = 11
It is also clear that 𝑓𝑐2 = 2𝑛1 𝑓𝑐1 and 𝑓𝑐4 = 2𝑛2 𝑓𝑐3
To find 𝑓𝐿𝑜 , there are three possible relationships: 𝑓𝑐3 = 𝑓𝑐2 ± 𝑓𝐿𝑜 and
𝑓𝑐3 = 𝑓𝐿𝑜 -𝑓𝑐2 . Each should be tested to determine one that will fall in 400kHz≤ 𝑓𝐿𝑜 ≤500kHz.
(a) First, we test 𝑓𝑐3 = 𝑓𝑐2 − 𝑓𝐿𝑂 , this leads to
97.3× 106 = 2𝑛2 (2𝑛1 𝑓𝑐1 -𝑓𝐿𝑜 )= 2𝑛1+𝑛2 𝑓𝑐1 −2𝑛2 𝑓𝐿𝑜 = 211 × 20 × 103 - −2𝑛2 𝑓𝐿𝑜 .
Thus we have 𝑓𝐿𝑜 = 2−𝑛2(4.096× 107 -9.73× 107 ) <0.
This is outside the local oscillator frequency range.

(b) Next, we test 𝑓𝑐3 = 𝑓𝑐2 − 𝑓𝐿𝑜 . This case leads to,
97.3× 106 = 2𝑛2 (2𝑛1 𝑓𝑐1 +𝑓𝐿𝑜 )= = 2𝑛1+𝑛2 +𝑓𝑐1 -2𝑛2 𝑓𝐿𝑜 = 211 × 20 × 103 +2𝑛2 𝑓𝐿𝑜
Thus we have 𝑓𝐿𝑜 = 2−𝑛2(9.73× 107 - 4.096× 107 ) = 2−𝑛2 × 5.634 × 107 .
If 𝑛2 =7, then 𝑓𝐿𝑜 = 440 kHz, which is within the realizable range of the local oscillator.

(c) If we choose 𝑓𝑐3 = 𝑓𝐿𝑜 − 𝑓𝑐2 , then we have


97.3× 106 = 2𝑛2 (𝑓𝐿𝑜 - 2𝑛1 𝑓𝑐1 )= 2𝑛2 𝑓𝐿𝑜 - 2𝑛1+𝑛2 𝑓𝑐1 = 2𝑛2 𝑓𝐿𝑜 - 211 × 20 × 103
Thus, we have 𝑓𝐿𝑜 = 2−𝑛2(9.73× 107 + 4.096× 107 )= 2−𝑛2 × 13.826 × 107
No integer 𝑛2 will lead to a realizable 𝑓𝐿𝑜 .

Calculations for multipliers


𝑀1 = 2𝑛1 = 𝑀1 = 24 = 16 , 4 is frequency doubler
𝑀2 = 2𝑛2 = 𝑀1 = 27 = 128 , 7 is frequency doubler
TASK 2
Design of a CAN communication network for a car
The Controller Area Network (CAN) is a widely adopted communication protocol within the
automotive sector. Here is a step-by-step guide for designing a CAN communication network
for a car:[5]
1.Assign unique IDs to all participating components involved in the communication process.
2.Determine which components will function as senders and receivers of messages.
3.Establish the desired message frequency and data size for each component.
4.Configure filters and masks for each component.
5.Conduct thorough testing of the network to ensure proper functionality.
CAN (Controller Area Network) serves as a bus communication protocol extensively utilized in
automotive applications. It facilitates communication between diverse systems in modern cars,
including the engine control unit, transmission control unit, and other electronic control units.
In this particular case, our objective is to design a CAN communication network for a car
comprising a central unit (ECU ID = 0x1128D7BA) and four monitoring systems (fuel
(ID=0x13D1123A), brake (ID=0x13D1124A), heating (ID=0x13D1125A), engine
(ID=0x13D1126A)).
We will set appropriate filter and mask values for each component, enabling the monitoring
systems to receive messages solely from the ECU, while the ECU can receive messages from all
monitoring components. Step by step execution of controlled area network is below:
Step 1: Identifying communication requirements
The initial step involves identifying the communication requirements of the CAN network. In
this scenario, we have a central unit (ECU) that necessitates communication with four
monitoring systems (fuel, brake, heating, and engine). The ECU should receive messages from
all monitoring systems, whereas the monitoring systems should only receive messages from the
ECU.
Step 2: Selecting CAN bus speed
Next, we need to select the appropriate CAN bus speed, which refers to the rate at which
messages are transmitted on the bus. The commonly used speeds in automotive applications
are 125 kbps, 250 kbps, and 500 kbps. [6]For this case, we will utilize a CAN bus speed of 500
kbps.
Step 3: Assigning CAN IDs
Each component must be assigned a unique CAN ID. In this scenario, we have five components:
the ECU and four monitoring systems. The ECU will be assigned an ID of 0x1128D7BA, while the
monitoring systems will have IDs of 0x13D1123A, 0x13D1124A, 0x13D1125A, and 0x13D1126A.
Step 4: Setting up filters and masks
Filters and masks play a crucial role in determining which messages are received by each
component. In this scenario, we want the ECU to receive messages from all monitoring systems,
whereas the monitoring systems should only receive messages from the ECU. The filter and
mask values should be configured accordingly:
For the ECU:
Filter: 0x00000000
Mask: 0x1FFFFFFF
For the fuel monitoring system:
Filter: 0x1128D7BA
Mask: 0x1FFFFFFF
For the brake monitoring system:
Filter: 0x1128D7BA
Mask: 0x1FFFFFFF
For the heating monitoring system:
Filter: 0x1128D7BA
Mask: 0x1FFFFFFF
For the engine monitoring system:
Filter: 0x1128D7BA
Mask: 0x1FFFFFFF
In this case, the filter value "0x00000000" indicates that the ECU will not filter or restrict any
incoming messages based on their content. It effectively allows all messages to pass through
without any filtering criteria. The ECU will receive all messages transmitted on the CAN bus. The
assigned filter value "0x1128D7BA to all of the given 4 monitoring system will ensure that they
are able to receive the messages from ECU only.
The mask value "0x1FFFFFFF" indicates that all 29 bits of the received message identifier (ID)
will be considered when matching against the filter. The mask is set to its maximum value,
allowing for a precise match of all bits in the ID.
Therefore, with this configuration, the ECU will receive all messages transmitted on the CAN
bus, as the filter does not impose any restrictions, and the mask ensures that all bits in the ID
are considered for matching.
Once the filters and masks have been set up, it is important to conduct a thorough network test
to ensure proper functionality. Send messages from each component and carefully verify that
they are being received by the intended recipient. This step is crucial in confirming that the
communication system is working as intended.
Step 5: Implementing the design
The final step involves implementing the design by programming the filters and masks into each
component. This programming task can be accomplished using a CAN bus analyzer tool such as
CANalyzer or CANoe.
After implementing the design, the ECU will have the capability to receive messages from all
monitoring systems, while the monitoring systems will exclusively receive messages from the
ECU. This arrangement guarantees efficient and secure communication on the CAN bus.
To summarize, the process of designing a CAN communication network for a car necessitates
careful consideration of communication requirements, careful selection of the suitable CAN bus
speed, allocation of unique CAN IDs to each component, and proper configuration of filters and
masks for effective message filtering. By adhering to these steps, we can ensure that the
communication on the CAN bus is efficient, secure, and aligns with the specific requirements of
the automotive application.
TASK 3
A. Text to PDU conversion at User-A
The PDU mode incorporates encoded information using a 7-bit binary stream, which is suitable
for transmitting compressed data and binary information using various encoding schemes (the
scheme to be used when converting the message –Exam is on Friday, should be the binary 7-bit
stream that converts the text to binary format).
The pseudocode for converting a text message to PDU format involves the following steps:
a. User A provides the following information:
Sender number: +44989898671
Message content: Exam is on Friday
b. The PDU parser channel at point AP-1 receives the message and switches it to ASCII text
mode.
c. The text message is then converted into a binary hex-dump string, utilizing a septet encoding
scheme that represents each character using 7 bits.
d. The resulting data is encoded in a binary format, creating subsequent binary streams that
represent the information from the text message.
Therefore, by encoding the message using 8-bit octets, a binary oscillation process takes place,
resulting in the message being transformed into PDU mode.
The message is converted in the following sequential step:[7]

• Message in plain text: Exam is on Friday


• Text in hexadecimal form: 45 78 61 6D 20 69 73 20 6F 6E 20 46 72 69 64 61 79
• The message in form of a binary octet:
01000101 01111000 01100001 01101101 00100000 01101001 01110011
00100000 01101111 01101110 00100000 01000110 01110010 01101001
01100100 01100001 01111001
• The message in the form of binary septets:
1000101 1111000 1100001 1101101 0100000 1101001 1110011 0100000
1101111 1101110 0100000 1000110 1110010 1101001 1100100 1100001
1111001
• The message in the form of PDU in binary form after changing MSBs & LSBs
10001011 11100011 00001110 11010100 00011010 01111001 10100000
11011111 10111001 00000100 01101110 01011010 01110010 01100001
01111001

• The message in the form of PDU hexadecimal format:


8B E3 0E D4 1A 79 A0 DF B9 04 6E 5A 72 61 79
• When the recipient at AP-1 is received the resultant PDU specifies the source address:
0011000C914476982143650000FF118BE30ED41A79A0DFB9046E5A726179

B. Fragmentation at AP-1:
After the initial conversion of the text to PDU format, the resulting PDU sequence is forwarded
to AP-1 for further transmission to AP-2. At AP-1, the PDU sequence undergoes a fragmentation
process to enable transmission over the wireless channel. This fragmentation involves breaking
down the PDU sequence into smaller packets, where each packet consists of a maximum of
three bytes.[7]

Packet 1: 10001011 11100011 00001110 (24 bits)


Packet 2: 11010100 00011010 01111001 (24 bits)
Packet 3: 10100000 11011111 10111001 (24 bits)
Packet 4: 00000100 01101110 01011010 (24 bits)
Packet 5: 01110010 01100001 01111001 (24 bits)

AP-1 assigns a channel switching pattern/sequence of 1324, which means the packets will be
transmitted in the order: Packet 1, Packet 3, Packet 2, Packet 4, Packet 5. Since there are only 5
packets and the channel switching pattern requires 8 channels, we can repeat the pattern from
the beginning. The updated channel switching pattern would be 13241324. This means that
after the 4th channel, we loop back to the 1st channel and continue the pattern. The last packet
would be assigned to channel 1.
Transmission over the wireless channel using FHSS:
AP-1 starts transmitting Packet 1(10001011 11100011 00001110) on the first channel. After a
unit of time, AP-1 switches to the third channel and transmits Packet 3 (10100000 11011111
10111001) and the process will go on until all the packets are transmitted successfully with
switching pattern.
Fragmented PDU:

10001011111000110000111010100000110111111011100111010100000110100111100
1000001000110111001011010011100100110000101111001

Defragmentation at AP-2:
AP-2 receives the transmitted packets in the order: Packet 1, Packet 3, Packet 2, Packet 4,
Packet 5. This received packets are carefully processed and undergo defragmentation to rebuild
the original PDU sequence. Defragmentation involves reorganizing the packets and merging
them together to restore the original order of the PDU sequence. The process is facilitated by
utilizing the sequence numbers assigned to each packet, which are included in their respective
headers. These sequence numbers allow AP-2 to correctly arrange the packets, ensuring the
PDU sequence is accurately reconstructed.
Reassembled PDU:

10001011111000110000111011010100000110100111100110100000110111111011100
1000001000110111001011010011100100110000101111001

C. PDU-to-Text Conversion at User-B


The PDU sequence received from AP-2 needs to be converted back into text form by reversing
the steps performed during the text-to-PDU conversion. Each PDU character is decoded into its
corresponding ASCII character representation. The ASCII characters are combined to form the
final received message.

• User-B receives the reassembled PDU from AP-2

10001011111000110000111011010100000110100111100110100000110111111011100100
0001000110111001011010011100100110000101111001

• The message in PDU hex format will be:

8B E3 0E D4 1A 79 A0 DF B9 04 6E 5A 72 61 79

• The message translated in binary octet (7-bit stream octet value stream):

01000101 01111000 01100001 01101101 00100000 01101001 01110011 00100000


01101111 01101110 00100000 01000110 01110010 01101001 01100100 01100001
01111001
• The resulting hexadecimal for the identifier becomes:

45 78 61 6D 20 69 73 20 6F 6E 20 46 72 69 64 61 79

• Conversion into plain text becomes Exam is on Friday


References
1. Augustine O. Nwajana, July 2021International Journal of Electronics Communications and
Measurement Engineering , https://www.researchgate.net/publication/352884099_A_Step-by-
Step_Approach_to_BandpassChannel_Filter_Design
2. Mohindru, P., & Mohindru, P. (2021). Introducing LTspice XVII circuit simulator.
3. Electronic Circuit Analysis using LTspice XVII Simulator, 1-30.
https://doi.org/10.1201/9781003199489-1-1
4. Kim, B., & Park, S. (2018). ECU software updating scenario using OTA technology
through mobile communication network. 2018 IEEE 3rd International
Conference on Communication and Information Systems (ICCIS).
https://doi.org/10.1109/icomis.2018.8645019
5. Lin, C., & Sangiovanni-Vincentelli, A. (2012). Cyber-security for the controller area
network (CAN) communication protocol. 2012 International Conference on
Cyber Security. https://doi.org/10.1109/cybersecurity.2012.7
6. Alexander Schure, Ph.D., Ed. D. , JOHN F. RIDER PUBLISHER, INC. RESONANT CIRCUITS,
https://worldradiohistory.com/BOOKSHELF-ARH/Technology/Rider-Books/R-
F%20Amplifiers%20-%20Alexander%20Schure.pdf
7. Ullah, R., Ali, A., & Latif, S. (2013). Security improvement by using dual coded FHSS
(DC-FHSS). International Journal of Computer Applications, 76(7), 1-7.
https://doi.org/10.5120/13256-0733
8. Weik, M. H. (2000). Protocol data unit. Computer Science and Communications
Dictionary, 1361-1361. https://doi.org/10.1007/1-4020-0613-6_14994
9. Modern digital and analog communication systems [5th ed] https://ebin.pub/modern-digital-
and-analog-communication-systems-5th-ed-9780190686840-0190686847.html?cv=1

You might also like