Method for generating a calibration function of a WIM sensor; which WIM sensor is arranged in a roadway; which WIM sensor measures a wheel force exerted on the surface of the roadway; characterized in that the following steps are performed: a) The road profile of a roadway is recorded, the road profile of the roadway being a three dimensional representation of the surface of the roadway; b) the wheel force is determined by a simulation, which wheel force is exerted on the road profile by a wheel; the simulation 102 comprises at least one damped mass-spring system; the damped mass-spring system comprising at least one spring element (42,84), at least one damper element (41,83) and at least one mass (m3,m8); which wheel is moving with a speed across the road profile of step a) in a longitudinal direction; which wheel is pressed onto the surface of the roadway; wherein the simulation is performed using at least the one damped mass-spring system and wherein the wheel force is determined by establishing and solving a system of differential equations, said system of differential equations solving the equation of movement of a wheel mass and a body mass; c) the dependency of the wheel force determined in step b) on the road profile recorded in step a) is determined by simulation for at least one position of the road profile recorded in step a); and d) the dependency of the position determined in step c) is used to minimize the influence of the road profile on the wheel force measured by the WIM sensor by generation of a calibration function for a WIM sensor, wherein for generation of the calibration function the dependency of the wheel force on the road profile at the position the WIM sensor is arranged in the roadway is determined according to step c) for different speed ranges; and step c) is performed for different wheel force ranges; and the spring elements (42, 84) and the damper elements (41, 83) are predetermined for a respective wheel force range; wherein the deviation of the wheel force depending on the speed range and mass range and on the road profile from a measured wheel force of a stationary vehicle with a mass within the mass range is determined; and that the calibration function generated is able to subtract the deviation from a measured wheel force of the WIM sensor according to the wheel force range and according to the speed range of a speed determined for the wheel. a) The road profile of a roadway is recorded, the road profile of the roadway being a three dimensional representation of the surface of the roadway; b) the wheel force is determined by a simulation, which wheel force is exerted on the road profile by a wheel; the simulation 102 comprises at least one damped mass-spring system; the damped mass-spring system comprising at least one spring element (42,84), at least one damper element (41,83) and at least one mass (m3,m8); which wheel is moving with a speed across the road profile of step a) in a longitudinal direction; which wheel is pressed onto the surface of the roadway; wherein the simulation is performed using at least the one damped mass-spring system and wherein the wheel force is determined by establishing and solving a system of differential equations, said system of differential equations solving the equation of movement of a wheel mass and a body mass; c) the dependency of the wheel force determined in step b) on the road profile recorded in step a) is determined by simulation for at least one position of the road profile recorded in step a); and d) the dependency of the position determined in step c) is used to minimize the influence of the road profile on the wheel force measured by the WIM sensor by generation of a calibration function for a WIM sensor, wherein for generation of the calibration function the dependency of the wheel force on the road profile at the position the WIM sensor is arranged in the roadway is determined according to step c) for different speed ranges; and step c) is performed for different wheel force ranges; and the spring elements (42, 84) and the damper elements (41, 83) are predetermined for a respective wheel force range; wherein the deviation of the wheel force depending on the speed range and mass range and on the road profile from a measured wheel force of a stationary vehicle with a mass within the mass range is determined; and that the calibration function generated is able to subtract the deviation from a measured wheel force of the WIM sensor according to the wheel force range and according to the speed range of a speed determined for the wheel.