Can Matlab be used for digital filter design and modeling?

  • Thread starter john121
  • Start date
  • Tags
    Signal
In summary, the goal of the project is to find ways to filter noise from a square wave signal that is heavily skewed in duty cycle. The data collected will be used to create several different simulated designs.
  • #1
john121
1
0
Hi,
I'm new to the forum, as well as DSP. I am currently doing a project which involves filtering a square wave signal with a heavily skewed duty cycle which is going to have all sorts of noise imparted onto it.

The basics of the project are such that this square wave is to be propogated down a railway line. When it hits a S/C or O/C it will be reflected back towards the source. The time delay between sent pulse and reflected pulse can therefore be worked out.

In order to work out this time delay, some filtering will have to be done on the reflected signal, as a lot of noise (traction return current, harmonics from rectifying circuits for DC motors on trains) will be imparted onto it and therefore the pulse may not be initially visible.

This project is not intended to result in a working design but rather have several different thought out designs (with simple simulations where possible) which could be implemented and then choosing the best one.

The square wave will probably have a duty cycle of around 2/10, with complete pulse duration being less than 20us. The frequency of pulses is quite slow, roughly 1-2 seconds between pulses.

Currently I am trying to find out the characteristics of the above noise signals.

Can anyone suggest filtering ideas which could work.

Is it possible possible to do some simulation/modeling of digital filters using Matlab? I have only had very brief encounter with Matlab and therefore any help regarding getting started with filter design/modeling in Matlab would be very appreciated.

If I've missed out any crucial information then please let me know.
Thanks to anyone who can add anything to this topic.
 
Engineering news on Phys.org
  • #2
Before designing a filter, you must have the characteristics of the noise as well as the ideal square wave. Do some experiments and gather the data. Then you can use that data in a simulation with your proposed filter.

This website will help you with the filter design.
http://sim.okawa-denshi.jp/en/Fkeisan.htm
 
  • #3
The problem of detecting broken rail is an important issue for the railroads and one that hasn't been solved, even after a considerable amount of effort.

Can you answer a few questions about your project?
1. Will the source of your pulses be on board a locomotive or at the wayside of the tracks?
2. How will you inject your signal into the tracks?
3. What will the return path of your pulse be? Ground? The other track?
4. How will you control which direction down the track the pulse travels or do you intend to do both directions simultaneously? If the latter, how will you determine from which direction the echo comes.
 
  • #4
Welcome to the PF.
john121 said:
The basics of the project are such that this square wave is to be propogated down a railway line. When it hits a S/C or O/C it will be reflected back towards the source. The time delay between sent pulse and reflected pulse can therefore be worked out.
What do you mean by propating down a railway line? What is the transmission line? Is it just the tracks? If so, are they insulated from the ground in some way? What about when it rains? What is the complex Zo of train tracks over ground, and how much does it vary with weather? If you are propagating your signal down a 3rd rail or along some other transmission line, what are its characteristics?

One suggestion is to use a chirped narrow-band AC signal instead of a pulse waveform. You would be able to do a lot better filtering if you know the frequency component(s) of your chirped waveform. Trying to filter a rectangular pulse waveform to recover it in the face of lots of broadband noise is pretty problematic, IMO.

http://www.radartutorial.eu/08.transmitters/Intrapulse Modulation.en.html
EDIT / ADD -- In my experience, TDRs are generally used in environments that are not very noisy...

https://en.wikipedia.org/wiki/Time-domain_reflectometer
 
Last edited:
  • Like
Likes anorlunda
  • #5
@john121. Welcome to PF.

TDR is used to look at discontinuities in the impedance of a transmission line. Railway track can be modeled as a two parallel conductor transmission line. That line will be short circuited by trains.

It will not be practical to build an analog filter to remove noise, or to enhance a rectangular signal. The only way is to synchronously digitise the signal and accumulate many time shots in digital memory. The repeated signal will sum, while the interference will average out. A microcontroller with a cyclic buffer can do that accumulation.
There is an advantage in dithering the start time of the test pulse so as to avoid synchronous harmonic interference.
There is also an advantage in triggering on alternate phases of the local mains frequency in the hope that it will cancel. For three phase power systems you need 6 start phases per data set.

Since attenuation reduces the distance at which you can resolve changes in line impedance, there is an advantage in an analog system that progressively increases the gain of the receiver following the transmitted pulse edge.

The shape of the pulse used is determined by how far you want to look.
For short distances you need to use a rectangular pulse that lasts for the maximum return time, then turns off while the system settles, before being repeated. The time or distance resolution is determined by the rise-time of the step edge.

For long distances a half-sine wave pulse is used. That suffers less attenuation with distance, causes less RFI and interference to other equipment, and takes less energy to drive the line. But it does need more analog processing to integrate the signal to produce a useful result.

In high noise environments it is necessary to transmit a continuous pseudo-random signal, or a shorter chirp, down the line. The signal can then be digitised, then be correlated with the transmitted signal to obtain the time of arrival of reflections due to distant impedance changes. Power spectrum accumulation can then lift the reflections out of the noise.
 
Last edited:
  • Like
Likes berkeman
  • #6
I suppose in this era we might copy GPS and use a pseudo random sequence which the receiver can look for. This will allow noise reduction by averaging. In former times I suppose we would use a strobe pulse to sample the echo.
 
  • #7
Spread spectrum TDR works well in noisy environments.
https://en.wikipedia.org/wiki/Spread-spectrum_time-domain_reflectometry
Take the FFT of the received signal, multiply it by the FFT of the transmitted signal. Take the inverse FFT of the product and you have filtered your signal.
You can use that technique to filter one rectangular pulse or a continuous random signal.

If the transmitted signal is continuous, with low self-correlation, such as a white noise source, or the PRBS from a LFSR, then you can get a significant process gain advantage from the Fourier transform. For an n sample record you should get a √n reduction in noise. 1024 samples will give you noise / 32. That is a 30dB signal to noise advantage.
https://en.wikipedia.org/wiki/Linear-feedback_shift_register
 
  • Like
Likes berkeman
  • #8
Assuming the sleepers are (reinforced?) concrete, they would not necessarily be good insulators so what sort of leakage (at a 700mm spacing) is likely, along an undamaged transmission line? The characteristic impedance of the two wire line would be a few hundred Ohms. I would guess. The concrete could present a series of reflections but the main problem would be loss, I suspect. (It can be difficult to detect whether or not a load at the far end is actually connected with a lossy cable. All loads look like a 'good match')
The PRBS method for reflectometry has advantages and measurements could be continuous so a change, down in the noise, could probably be detected.

However, would it not be better to monitor the track with on-board equipment. mounted on most or all trains? The signal to noise ratio would be much higher and the position of a crack could be found very accurately because a much higher frequency could be used. A pair of capacity probes, at either end of a truck could detect a small change in the series resistance of several metres of track.

It all depends on the length of rail to be measured and the likely signal power, I think. The devil is in the detail of a project like this. Matlab Simulation is attractive but you have to put in the right numbers for such a practical system.
 
  • #9
sophiecentaur said:
(It can be difficult to detect whether or not a load at the far end is actually connected with a lossy cable. All loads look like a 'good match')
True. The line loss will attenuate the signal, the reflection and the mismatch.

Placing a transformer core around the axle, so making the axle a secondary, will make it possible to inject a current into the track. At low frequencies all axles on the carriage will need to be driven in parallel. Only for high frequency short range TDR will it be possible to employ those transformers as a hybrid directional coupler to look forwards, away from the short circuit following by train.

Until the OP identifies the application we cannot identify the range or the coupling requirements.
 
  • #10
We have had similar attempts with similar methods to locate remote faults on power transmission lines, underground cables, and even optical cables. I say limited, because they had only minor successes.

One thing we did learn was that the detection scheme could be enhanced by injecting the test signals at both ends of the line. Then the results reflected back to each end, plus the through transmission of signal (if any), plus baseline measurements, could all be combined into a best estimate of what is out there.
 
  • #11
Baluncore said:
True. The line loss will attenuate the signal, the reflection and the mismatch.

Placing a transformer core around the axle, so making the axle a secondary, will make it possible to inject a current into the track. At low frequencies all axles on the carriage will need to be driven in parallel. Only for high frequency short range TDR will it be possible to employ those transformers as a hybrid directional coupler to look forwards, away from the short circuit following by train.

Until the OP identifies the application we cannot identify the range or the coupling requirements.
It seems that you are assuming a pretty low signal frequency in your proposed system. Will that not reduce the sensitivity to a small discontinuity? The only TDR technology I have used has been for measuring UHF feeders and distribution circuitry so that's several orders of magnitude smaller scale but I know that small changes in impedance such as transitions from coax to strip line etc. are hard to spot, even with ps pulses. They tend to get smoothed out on a display.
I have been assuming that tens of MHz would be involved and that the signals would be launched with a large diameter air cored coil (say). The train itself would be a nuisance, of course.
I wonder if the OP has any sources for practical advice?
 
  • #13
anorlunda said:
We have had similar attempts with similar methods to locate remote faults on power transmission lines, underground cables, and even optical cables. I say limited, because they had only minor successes.

One thing we did learn was that the detection scheme could be enhanced by injecting the test signals at both ends of the line. Then the results reflected back to each end, plus the through transmission of signal (if any), plus baseline measurements, could all be combined into a best estimate of what is out there.
A good idea in principle but it would have required some synchronisation between the two ends. How was that achieved - unless you had a reel of cable.
 
  • #14
sophiecentaur said:
A good idea in principle but it would have required some synchronisation between the two ends. How was that achieved - unless you had a reel of cable.
Nah, they've been using visible synchronization for a long time for these measurements...

https://pics.me.me/smoke-signals-cant-quite-who-are-those-guys-with-the-34229511.png
246039
 
  • Like
Likes Asymptotic and sophiecentaur

1. What is the purpose of filtering a railway signal?

The purpose of filtering a railway signal is to remove any unwanted noise or interference from the signal, ensuring that only the intended information is transmitted and received accurately.

2. How does filtering a railway signal work?

Filtering a railway signal involves using electronic devices, such as capacitors and inductors, to selectively allow certain frequencies to pass through while blocking others. This process helps to smooth out the signal and eliminate any unwanted variations or distortions.

3. What types of filters are commonly used in railway signals?

The most commonly used filters in railway signals are low-pass filters, high-pass filters, and band-pass filters. These filters are designed to either remove high frequency noise, low frequency noise, or both, respectively.

4. Why is filtering a railway signal important for safety?

Filtering a railway signal is crucial for safety because any interference or noise in the signal could cause incorrect information to be transmitted, leading to potential accidents or malfunctions. By filtering the signal, the accuracy and reliability of the information being transmitted is improved, reducing the risk of safety hazards.

5. Are there any challenges or limitations to filtering a railway signal?

One of the main challenges of filtering a railway signal is finding the right balance between removing unwanted noise and preserving the integrity of the signal. Over-filtering could result in important information being lost, while under-filtering could allow interference to affect the signal. Additionally, extreme weather conditions and external factors can also impact the effectiveness of filtering a railway signal.

Similar threads

  • Electrical Engineering
Replies
1
Views
625
Replies
5
Views
1K
  • Electrical Engineering
Replies
3
Views
793
  • Electrical Engineering
Replies
6
Views
840
Replies
104
Views
23K
  • Electrical Engineering
Replies
1
Views
2K
Replies
8
Views
1K
Replies
25
Views
4K
Replies
9
Views
1K
Replies
1
Views
3K
Back
Top