TOKYO, April 20— The Mazda Motor Corporation has developed an automobile engine that the company says provides both high power and low fuel consumption using a design that has long stymied automotive engineers.

The design is for a Miller-cycle engine, named after Ralph Miller, an American who conceived of it in 1947. This type of engine has had limited use in boats and gasoline-powered electrical generators, but Mazda says its design is the first Miller-cycle engine that is practical for cars.

The Hiroshima-based company said it would use the engine in a car to be marketed in the near future. Although Mazda has not publicly specified the car, it is widely expected to be a high-end model that will be introduced in Japan this fall. The company said it had not decided whether it would eventually sell the cars in the United States. 50% Power Gain Is Claimed

Mazda said the gasoline-powered Miller-cycle engine can produce torque, or twisting power, that is 50 percent greater than that produced by a conventional engine of the same displacement. That means it would be possible to use small fuel-efficient engines in larger cars. The company said the Miller-cycle engine also improves fuel efficiency by 10 to 15 percent over a conventional engine offering the same power output.

The engine is the latest effort by a Japanese company to improve the internal combustion engine to get more fuel efficiency without sacrificing power. Even in Japan, where gasoline costs three times as much as in the United States, consumers no longer accept under-powered cars for the sake of saving fuel.

Last year, Mitsubishi Motors introduced an engine that used four cylinders when power was needed and shifted to two cylinders in slow city driving to save fuel, an idea that had been tried and abandoned by General Motors a decade earlier. Mitsubishi offers this variable-cylinder engine as an option on its Mirage and Lancer models in Japan, and the company said that so far fewer than 1 percent of customers had requested it.

Honda Motor, meanwhile, has been pushing its VTEC-E engine, which uses a combination of techniques to provide greater efficiency and is offered on some of its models. Some Possible Drawbacks

All these engines, however, have their drawbacks, and Mazda's new engine is likely to be no exception.

"If it will indeed be commercialized, it would be the first time for a Miller-cycle engine," conceded an engine designer for another Japanese automobile company, who spoke on the condition that neither his name or that of his company be disclosed.

"Other companies have been researching Miller-cycle engines but have not found much merit in them," he said. As for his own company, he said that it had concluded that a Miller-cycle engine would be too costly. He said he could not comment in detail on Mazda's engine because he had not seen enough data. Variation in Cycles

Mazda has a history of championing engines that others have rejected. It nearly went out of business trying to perfect the rotary engine that is now used in its popular RX-7 sports car. And when it comes to future engines that will not use gasoline, Mazda is hard at work on vehicles that will run on hydrogen.

To reduce the danger of an explosion, the Mazda hydrogen car will store the fuel as a solid metal hydride. Mazda hopes to road-test a hydrogen-powered car in 1995.

Conventional gasoline engines use what is called the Otto cycle, named for Nikolaus August Otto, the German engineer who in the 1870's built the forerunner of the modern four-cycle auto engine. In the Otto cycle, the piston travels the same distance upward when compressing the air and fuel mixture as it does when it moves downward after the fuel is ignited. In the Miller-cycle engine, the compression phase is made shorter than the expansion stroke.

Generally speaking, the more air that enters an engine's cylinders, the greater the power of the engine. So, one way to get a powerful engine is to make a large engine that can handle a lot of air. But such large engines are not fuel efficient.

The other approach is to force more air into the cylinder of a small engine. That is what Mazda's Miller-cycle engine does, using a compressor to force air into the cylinders at twice the level found in traditional Otto-cyle engines.

One potential problem with letting in too much air is that the air will be heated during the compression stroke, causing uneven combustion that produces the tell-tale vibration and sound known as knocking.

Reducing compression will prevent knocking. But in a conventional engine, that means reducing the expansion stroke -- the one that actually produces the power to propel the car.

A Miller-cycle engine in effect shortens the compression stroke, reducing the overheating that causes knocking while still allowing a full power-producing expansion stroke. The piston still travels the full distance during the compression stroke but the valve that lets air into the cylinder is left open during the first part of the stroke so that no compression occurs then. This lets some air escape before it can overheat and cause knocking.

But the shortened compression phase does not hamper the engine's performance. Because the air compressor has already pumped in a double supply of air, when the valve does close and compression begins there is still much more pressure in the Miller-cycle cylinder than in the cylinder of a standard engine during compression.

Diagram: "Refining the Four-Cycle Engine" In the traditional four-cycle automobile engine, a piston repeatedly executes a sezuence of four strokes, illustrated in 1,2,3 and 4 above. In the Miller-cycle engine as developed by Mazda, the compressionstroke (2a) is different. In traditional engines, at the compression stroke (2), the piston compresses a full cylinder of air-fuel mixture during the whole upward stroke. The Mazda engine operates on compressed air, which can create greater engine power but also generates so much pressure that the air-fuel mixture could overheat, causing uneven or premature combustion. To relieve part of this pressure, during the compression stroke (2a), a valve remains open until the piston is part of the way up the cylinder. The valve then closes and the piston compresses the remaining air-fuel mixture during the rest of the upward stroke.