The purpose of this task is to encourage an increase in the awareness of the uses of programming in engineering in the reader, an awareness centered on tackling a complex problem found in a typical signal collection domain. The high-level language to be used for this assignment is the C++ programming language and the use of the procedural or object-oriented C++ approach is allowed
Increase an awareness of the uses of programming in engineering, along with a typical computer interface;
Develop skills in algorithm design and in the application of a high-level computer language to implement such a design;
Understand a typical software methodology used in industry.
Hence, after successful completion of this assignment, the reader will be able to:
Recognise and classify a variety of computer system interfaces and how they are used, specifically in signal collection for this instance;
Analyse the requirements of a system and develop an algorithm to meet the requirement of signal collection and parsing of a transmitted signal;
Implement an algorithm in procedural / object C++;
Develop a test schedule to confirm the correct operation of a computer program.
The exercise can be completed using the Visual Studio.NET environment under your Windows account. Other development environments that can achieve the same outcome are acceptable. Maximum marks in various sections are given throughout.
All data and information relating to this exercise can be found on the course page on the Portal.
All program examples developed so far completed in the laboratory sessions. It is assumed that these source files have been saved to a secure area;
cpp with unlimited.h, binfileread.cpp, decode.cpp and moments.cpp;
bin or borisj_20wpm_5letter.bin
bin or borisj_20wpm _5letter_short.bin
bin or borisj_10wpm_5letter.bin
bin or borisj_10wpm _5letter_short.bin
The middle of the last century saw an increase in the way information was broadcast and received as well as the variety of methods that this information was modulated on to a simple carrier. Clearly, the carrier was of much higher frequency that the main component of the information (for example, speech ranges from 300Hz to about 4.5kHz) since you needed the additional energy in order for this information to go over large distances.
A very simple way of broadcasting information was Morse code. Initially it was transmitted at the audio range over a fixed wire (a single tone, “On” or “Off”, to represent the alphanumeric information) but its specific alphabet was constructed from “dits” and “dahs” (say, 50ms for a dit, but three times longer for a dah). This alphabet also had durations when the tone was off to represent and inter-element space (IES), and inter-character space (ICS), or an inter-word space (IWS) – typically, 50ms, 150ms, 250 – 350ms, respectively. This is all very well when you have a human at the other end of the broadcast that can decode the information from the phrasing of the language, but very rarely did this person write down their interpretation of the letter from its unique combination of dits and dahs. And there’s the issue: decoding a Morse signal traditionally required a human.
Now, consider a route that a real-time, collected signal may take on the way to the information contained within it being successfully parsed out (or translated) to some readable form, for example (Figure 1):
455kHz IF Receiver
Recogniser (Morse, FSK, PSK, etc)
Parse (Information, sentences)
Figure 1: A Signal collected via an Antenna may go through several Stages until the Information contained within it is Parsed
The overall system indicated in Figure 1 clearly takes several stages, where each stage may contain several functions / classes containing several procedures / methods. Now consider that you need to find a method of automatically decoding this information into a set of letters to some readable form.
As far as you are concerned:
Recognition. The signal has already been recognised as Morse from a wide range of analogue type of signals (for example, Phase Shift Keying (PSK) where this can use 2, 4, 8, 16, or more phases in the cycle of a carrier to help increase the available capacity of the signal). You know that you are receiving a tone in the high frequency spectrum that is clearly Morse and you would not be able to go any further in retrieving this information until you had a high level of confidence in knowledge of the type of carrier;
Demodulation. The signal has now been demodulated down to the audio range and this would usually be between 600 to 800Hz, the most sensitive part of the audio spectrum with our hearing. (This was usually done by the Morse listener manually tuning in their receiver to the broadcast carrier and the equipment would output the signal in the hearing range, in a similar fashion to the way AM works.);
Decoding. You can hear a signal that contains a number and mixed combination of dits and dahs. However, since this signal has been stored on a workstation, it will have been sampled with a frequency in order that there is limited risk of aliasing. Hence, you may find that the signal was sampled at 10kHz or even higher. 10kHz means 10,000 samples for every second’s worth of data and a typical line of speech, “How are you today?” may last for a few seconds. This is a lot of data to handle and you simply cannot view all this data via a command window on the workstation. You need to have a way of managing the data that will be part of an algorithm in a program.
The timing in the information when a Morse signal was broadcast was never guaranteed – it was person tapping, or using a paddle, in order to generate the dits and dahs. If you cannot get a guarantee of the timings, how can you design an algorithm that needs to demodulate the information and indicate dit, dah, IES, ICS, or IWS? You may also be surprised to know that Morse was an internationally recognised signal until around the year 2000. Even today, there are a considerable number of amateur radio users that still communicate using Morse. Figure 2 illustrates the typical mechanism for learning Morse code.
Figure 2: Flowchart of the Morse Alphabet
Consider yourself as part of a signal collection domain working in the area of extracting coded information automatically and the programming language being used is ANSI C / C++ (there is a considerable amount of legacy code in existence and many programs are likely to have been written in ANSI C!).
To build up an algorithm that you are responsible for in your team, you will likely go through several steps:
Writing the code on a workstation where the input (STDIN) is from the keyboard and the output via the screen / terminal (STDOUT). Testing any part of the stage – verifying sections of this code – could be done using the software’s debugger, but could also done very simply by using printf() / cout(). For example, and something that was tried out during the session in Term 1, Week 10 (Figure 3): do not assume your algorithm is correct by default!
Call in main()
Checking inside the function call, and a use of cout() locally confirms the incorrect address assignment (or not) and then seen in main()
Checking the value, but an “unexpected” answer here
Figure 3: Example of an Algorithm (main()) that calls up a Function within it (addviareference()) (Term 1 / Week 10) – an unexpected Answer!
Writing the code on a workstation where the input is now from several archived files that contain content: the sentence is known and can be used as Ground Truth Data for the verification of any algorithm. Hence, if your algorithm returns an output that reflects the information passed into to it 100%, your algorithm can be trusted to reflect the correct content of a signal that has information that is not This would have been done with several archived signals (of known content) that would also have a range of SNR’s as well as fading in and out over a given time period.
Editing the code to now remove any instances of the use of STDIN/FILE and STDOUT since this would not be required in a real-time collection harness. This would only slow down the algorithm anyway, notwithstanding the input and output would have nowhere to go. Soak-testing over several days would be standard and checks on the performance of the algorithm are likely to include if there was any in an increase in the use of primary memory (memory leaks) and/or any inconsistency of CPU loading.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of