Can sampling rate be a floating point number?Visualising data rate as square waves (Converting bits per second into hertz) for selecting ADC sampling frequencyWhat are the advantages of recursive prony?Karplus Strong - getting a pluck of particular frequencySampling Signal using microcontrollerPerforming FFT at low frequencies but high resolution?Number of samples (n) and number of data points (N)Why fake harmonics appear when using weighting windows?
Problems with the adoption of the Latin script in English?
A feasible and efficient method of fast global travel?
Phrase/Word-pair for a variant of master-slave relationship
Outlining the climax made me lose interest in writing the actual story
Are commercial VFR flights legal?
Quantification in the infer command of the proof package
Why does Rome municipality seem to have a hard time maintaining the city?
Mostly pluses and minuses: says Grandpa
How to determine minimum word length of regular language
TSP with revenue maximization
Isn't any conversation with the US president quid-pro-quo?
Doubt about Taylor series: do successive derivatives on a point determine the whole function?
Does the Scatter spell actually scatter the targets?
Why does Greedo say "Maclunkey" in the Mos Eisley Cantina?
Does Global Entry require agreeing to a higher standard of behavior?
Why is there so much dispute about how ornaments are supposed to be played in classical music?
How do you create an APFS volume inside an ordinary file?
Are we sinners because we sin or do we sin because we are sinners?
On the method described by Purcell for finding the magnetic field by measuring the force on a test particle
In Flanders Fields
How can a person Insulate copper wire in a medieval world?
Are results that are derived simply by using more computational power publishable?
Is there a text editor that can run shell scripts?
Why were some early PC 3D cards unsuitable for 2D graphics?
Can sampling rate be a floating point number?
Visualising data rate as square waves (Converting bits per second into hertz) for selecting ADC sampling frequencyWhat are the advantages of recursive prony?Karplus Strong - getting a pluck of particular frequencySampling Signal using microcontrollerPerforming FFT at low frequencies but high resolution?Number of samples (n) and number of data points (N)Why fake harmonics appear when using weighting windows?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
$begingroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
$endgroup$
|
show 2 more comments
$begingroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
$endgroup$
4
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
Aug 12 at 7:34
2
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
Aug 12 at 7:55
$begingroup$
If your clock is one GHz, you get awfully close to 15.5/sec without using a float. So in seven seconds, you would have 108 samples (not 108.5).
$endgroup$
– WGroleau
Aug 12 at 21:08
3
$begingroup$
If a candy is $1.50 and you get a 33% discount you will be expected to pay one dollar and four cents not one dollar and three point 8 cents. While there are systems that can output half a sample (CCD sensors for example) in general a sample exists or does not exist. So you get 108 samples but the sampling rate is still 15.5Hz
$endgroup$
– slebetman
Aug 13 at 7:38
9
$begingroup$
There's some comfusion about terms here. "Floating point" is a particular set of related representations of real numbers often used by computer. Typically programs use floating point values to model real numbers, so a more correct title might ask "Can sampling rate be fractional?", i.e. a non-integer real number. However, since the confusion in the title may have contributed to this becoming a HNQ, I'm hesitant to sugest the edit.
$endgroup$
– Vaelus
Aug 13 at 14:11
|
show 2 more comments
$begingroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
$endgroup$
Suppose we have a sampling frequency for a signal of 15.5 samples/sec and we take samples for a period of 7 seconds. This means total samples are 108.5, does this make any sense?
Shouldn't the number of samples taken be an integer like 108 or 109? Or can the particular points in time from 0 second to 7 seconds on which to take the samples be determined in this case? How would one do that?
frequency signal-processing sampling
frequency signal-processing sampling
edited Aug 12 at 8:22
jusaca
3,1632 gold badges11 silver badges36 bronze badges
3,1632 gold badges11 silver badges36 bronze badges
asked Aug 12 at 7:29
Ron HowardRon Howard
591 silver badge4 bronze badges
591 silver badge4 bronze badges
4
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
Aug 12 at 7:34
2
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
Aug 12 at 7:55
$begingroup$
If your clock is one GHz, you get awfully close to 15.5/sec without using a float. So in seven seconds, you would have 108 samples (not 108.5).
$endgroup$
– WGroleau
Aug 12 at 21:08
3
$begingroup$
If a candy is $1.50 and you get a 33% discount you will be expected to pay one dollar and four cents not one dollar and three point 8 cents. While there are systems that can output half a sample (CCD sensors for example) in general a sample exists or does not exist. So you get 108 samples but the sampling rate is still 15.5Hz
$endgroup$
– slebetman
Aug 13 at 7:38
9
$begingroup$
There's some comfusion about terms here. "Floating point" is a particular set of related representations of real numbers often used by computer. Typically programs use floating point values to model real numbers, so a more correct title might ask "Can sampling rate be fractional?", i.e. a non-integer real number. However, since the confusion in the title may have contributed to this becoming a HNQ, I'm hesitant to sugest the edit.
$endgroup$
– Vaelus
Aug 13 at 14:11
|
show 2 more comments
4
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
Aug 12 at 7:34
2
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
Aug 12 at 7:55
$begingroup$
If your clock is one GHz, you get awfully close to 15.5/sec without using a float. So in seven seconds, you would have 108 samples (not 108.5).
$endgroup$
– WGroleau
Aug 12 at 21:08
3
$begingroup$
If a candy is $1.50 and you get a 33% discount you will be expected to pay one dollar and four cents not one dollar and three point 8 cents. While there are systems that can output half a sample (CCD sensors for example) in general a sample exists or does not exist. So you get 108 samples but the sampling rate is still 15.5Hz
$endgroup$
– slebetman
Aug 13 at 7:38
9
$begingroup$
There's some comfusion about terms here. "Floating point" is a particular set of related representations of real numbers often used by computer. Typically programs use floating point values to model real numbers, so a more correct title might ask "Can sampling rate be fractional?", i.e. a non-integer real number. However, since the confusion in the title may have contributed to this becoming a HNQ, I'm hesitant to sugest the edit.
$endgroup$
– Vaelus
Aug 13 at 14:11
4
4
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
Aug 12 at 7:34
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
Aug 12 at 7:34
2
2
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
Aug 12 at 7:55
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
Aug 12 at 7:55
$begingroup$
If your clock is one GHz, you get awfully close to 15.5/sec without using a float. So in seven seconds, you would have 108 samples (not 108.5).
$endgroup$
– WGroleau
Aug 12 at 21:08
$begingroup$
If your clock is one GHz, you get awfully close to 15.5/sec without using a float. So in seven seconds, you would have 108 samples (not 108.5).
$endgroup$
– WGroleau
Aug 12 at 21:08
3
3
$begingroup$
If a candy is $1.50 and you get a 33% discount you will be expected to pay one dollar and four cents not one dollar and three point 8 cents. While there are systems that can output half a sample (CCD sensors for example) in general a sample exists or does not exist. So you get 108 samples but the sampling rate is still 15.5Hz
$endgroup$
– slebetman
Aug 13 at 7:38
$begingroup$
If a candy is $1.50 and you get a 33% discount you will be expected to pay one dollar and four cents not one dollar and three point 8 cents. While there are systems that can output half a sample (CCD sensors for example) in general a sample exists or does not exist. So you get 108 samples but the sampling rate is still 15.5Hz
$endgroup$
– slebetman
Aug 13 at 7:38
9
9
$begingroup$
There's some comfusion about terms here. "Floating point" is a particular set of related representations of real numbers often used by computer. Typically programs use floating point values to model real numbers, so a more correct title might ask "Can sampling rate be fractional?", i.e. a non-integer real number. However, since the confusion in the title may have contributed to this becoming a HNQ, I'm hesitant to sugest the edit.
$endgroup$
– Vaelus
Aug 13 at 14:11
$begingroup$
There's some comfusion about terms here. "Floating point" is a particular set of related representations of real numbers often used by computer. Typically programs use floating point values to model real numbers, so a more correct title might ask "Can sampling rate be fractional?", i.e. a non-integer real number. However, since the confusion in the title may have contributed to this becoming a HNQ, I'm hesitant to sugest the edit.
$endgroup$
– Vaelus
Aug 13 at 14:11
|
show 2 more comments
4 Answers
4
active
oldest
votes
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
2
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
2
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
4
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
1
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
|
show 7 more comments
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac115.5s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
1
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
add a comment
|
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
add a comment
|
$begingroup$
This means total samples are 108.5, does this make any sense?
Only in a limited sense. Since your sample interval of 7 seconds is not an integer multiple of the sampling period (1/15.5 Hz = 0.064516... s), it means that any arbitrary 7-second interval will contain either 108 samples or 109 samples, and the average across all possible 7-second intervals will be 108.5 samples.
If you take a series of contiguous 7-second intervals, you'll find that the sample counts alternate between 108 and 109, again resulting in an average of 108.5.
$endgroup$
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("schematics", function ()
StackExchange.schematics.init();
);
, "cicuitlab");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "135"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f452566%2fcan-sampling-rate-be-a-floating-point-number%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
2
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
2
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
4
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
1
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
|
show 7 more comments
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
2
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
2
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
4
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
1
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
|
show 7 more comments
$begingroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
$endgroup$
Forget sampling rate for a few seconds... Think about sampling period for a second, which is the time interval between two consecutive samples. This time can be an integer or any real number (as long as it’s positive, of course).
Sampling rate is simply the inverse of sampling period. Does it make more sense this way?
edited Aug 12 at 20:22
answered Aug 12 at 7:37
joribamajoribama
1,7522 silver badges12 bronze badges
1,7522 silver badges12 bronze badges
2
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
2
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
4
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
1
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
|
show 7 more comments
2
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
2
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
4
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
1
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
2
2
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
$begingroup$
“This time can be an integer” – actually it can't. There's no meaningful way in which a physical quantity could be integral, not even within a given unit system, because there's always a small uncertainly / jitter pertubation.
$endgroup$
– leftaroundabout
Aug 13 at 7:49
2
2
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
$begingroup$
@leftaroundabout there are models of physics in which physical quantities can be represented as integers, for instance, Newtonian mechanics, which models many quantities as real numbers, not probability distributions or wave functions. If you're arguing that we'll always be able to measure a small fractional part of any physical quantity, consider a servo system set to track to an integer value and which uses the best meter available for feedback. To the best of our measurements, it will settle on an integer value.
$endgroup$
– Vaelus
Aug 13 at 14:22
4
4
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
And of course, the charge of a proton is +1 and an electron -1, no fractions, no uncertainty, no jitter.
$endgroup$
– MSalters
Aug 13 at 14:24
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
$begingroup$
@Vaelus it is specifically classical physics in which I consider it impossible to have integral time: in classical physics, every quantity does have an in principle exact real value, but we only ever measure / fix it to a finite-extend interval, and within such an interval almost all values (i.e., all that could actually occur) are irrational.
$endgroup$
– leftaroundabout
Aug 13 at 14:40
1
1
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
$begingroup$
@leftaroundabout - my choice of words was aimed at clarifying the basic question presented by the OP in the best way I could think of. I could have said “in the context of a first order model where the effects of jitter, relativity and quantum mechanics are neglected, we can define a scalar quantity called sampling period which can be assumed to be invariant and be expressed by any positive real number, which includes positive integers”. Maybe this would have been a more complete answer, but certainly not a better one.
$endgroup$
– joribama
Aug 13 at 21:22
|
show 7 more comments
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac115.5s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
1
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
add a comment
|
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac115.5s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
1
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
add a comment
|
$begingroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac115.5s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
$endgroup$
Yes, the sampling rate can be any number you want.
But you obviously would not get partial samples in the end, you just have to round down.
In your example the first sample is taken at $ frac115.5s $ = 64.5 ms and then at every multiple from that. This means you get your last sample at 6,966 s. That is the 108's sample. So at 7 s you still have taken only 108 samples. And then at 7,0305 s you get the next sample.
You can imagine the samples beeing taken in a way like this dirac comb:
If you stop sampling between 3T and 4T you do not have partial samples. You just round down. T is the inverse of the sample frequency, or in your case 64.5 ms.
edited Aug 12 at 7:51
answered Aug 12 at 7:42
jusacajusaca
3,1632 gold badges11 silver badges36 bronze badges
3,1632 gold badges11 silver badges36 bronze badges
1
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
add a comment
|
1
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
1
1
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
$begingroup$
FTR, the Dirac comb is not really how samples are taken in practice – that would be impossible to implement and, even even you only approximate it, usually a bad idea because of aliasing. For a real ADC the peaks are actually overlapping filter kernels. (But this does not invalidate your argument for the purposes of the question, in any way.)
$endgroup$
– leftaroundabout
Aug 13 at 7:59
add a comment
|
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
add a comment
|
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
add a comment
|
$begingroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
$endgroup$
Some things are always an integer. Samples are always integer. You can take 108 or 109 samples.
Sample rate can be a floating point number, or more generally a rational, or even a real.
You calculate the sample rate by dividing the number of samples (less one to get the number of periods between samples) by the time it takes to obtain those samples.
Generally a floating point number is an approximation to the real number you want. With double precision, it's a very good approximation, but it's usually inexact.
If you're given a sample rate, and a time, the product might be an exact integer, if the numbers are chosen carefully, but it probably won't be. It might be in error a small amount, due to the approximation of floating point representation. It might be in error a lot, because the source of your information chose very approximate numbers, or even made up the numbers to start with.
answered Aug 12 at 7:47
Neil_UKNeil_UK
89.2k2 gold badges91 silver badges206 bronze badges
89.2k2 gold badges91 silver badges206 bronze badges
add a comment
|
add a comment
|
$begingroup$
This means total samples are 108.5, does this make any sense?
Only in a limited sense. Since your sample interval of 7 seconds is not an integer multiple of the sampling period (1/15.5 Hz = 0.064516... s), it means that any arbitrary 7-second interval will contain either 108 samples or 109 samples, and the average across all possible 7-second intervals will be 108.5 samples.
If you take a series of contiguous 7-second intervals, you'll find that the sample counts alternate between 108 and 109, again resulting in an average of 108.5.
$endgroup$
add a comment
|
$begingroup$
This means total samples are 108.5, does this make any sense?
Only in a limited sense. Since your sample interval of 7 seconds is not an integer multiple of the sampling period (1/15.5 Hz = 0.064516... s), it means that any arbitrary 7-second interval will contain either 108 samples or 109 samples, and the average across all possible 7-second intervals will be 108.5 samples.
If you take a series of contiguous 7-second intervals, you'll find that the sample counts alternate between 108 and 109, again resulting in an average of 108.5.
$endgroup$
add a comment
|
$begingroup$
This means total samples are 108.5, does this make any sense?
Only in a limited sense. Since your sample interval of 7 seconds is not an integer multiple of the sampling period (1/15.5 Hz = 0.064516... s), it means that any arbitrary 7-second interval will contain either 108 samples or 109 samples, and the average across all possible 7-second intervals will be 108.5 samples.
If you take a series of contiguous 7-second intervals, you'll find that the sample counts alternate between 108 and 109, again resulting in an average of 108.5.
$endgroup$
This means total samples are 108.5, does this make any sense?
Only in a limited sense. Since your sample interval of 7 seconds is not an integer multiple of the sampling period (1/15.5 Hz = 0.064516... s), it means that any arbitrary 7-second interval will contain either 108 samples or 109 samples, and the average across all possible 7-second intervals will be 108.5 samples.
If you take a series of contiguous 7-second intervals, you'll find that the sample counts alternate between 108 and 109, again resulting in an average of 108.5.
answered Aug 13 at 11:46
Dave Tweed♦Dave Tweed
143k11 gold badges186 silver badges322 bronze badges
143k11 gold badges186 silver badges322 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Electrical Engineering Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f452566%2fcan-sampling-rate-be-a-floating-point-number%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
$begingroup$
What is the sampling rate if you take 217 samples over 14 seconds?
$endgroup$
– Harry Svensson
Aug 12 at 7:34
2
$begingroup$
yes, video, 29.97fps
$endgroup$
– user3528438
Aug 12 at 7:55
$begingroup$
If your clock is one GHz, you get awfully close to 15.5/sec without using a float. So in seven seconds, you would have 108 samples (not 108.5).
$endgroup$
– WGroleau
Aug 12 at 21:08
3
$begingroup$
If a candy is $1.50 and you get a 33% discount you will be expected to pay one dollar and four cents not one dollar and three point 8 cents. While there are systems that can output half a sample (CCD sensors for example) in general a sample exists or does not exist. So you get 108 samples but the sampling rate is still 15.5Hz
$endgroup$
– slebetman
Aug 13 at 7:38
9
$begingroup$
There's some comfusion about terms here. "Floating point" is a particular set of related representations of real numbers often used by computer. Typically programs use floating point values to model real numbers, so a more correct title might ask "Can sampling rate be fractional?", i.e. a non-integer real number. However, since the confusion in the title may have contributed to this becoming a HNQ, I'm hesitant to sugest the edit.
$endgroup$
– Vaelus
Aug 13 at 14:11